Beispiel #1
0
        static void Main(string[] args)
        {
            var config = DBServerConfig.GetInstance();

            var addressBuilder = new StringBuilder(20);

            addressBuilder.AppendFormat("http://*:{0}/", config.DBServerPort);

            //var baseAddress = addressBuilder.ToString();
            var baseAddress = "http://localhost:20000/";

            using (WebApp.Start <Startup>(url: baseAddress))
            {
                var result = DBServerMain.Init();

                if (result != ErrorCode.None)
                {
                    Console.WriteLine("DBServer Initialize Failed. ErrorCode : {0}", result);
                    return;
                }

                Console.WriteLine("DBServer Initialized. BaseAddress : {0}", baseAddress);
                Console.ReadLine();
            }
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            // TODO :: DB 서버 설정파일 읽어오기.
#if DEBUG
            const string baseAddress = "http://localhost:20000/";
#else
            const string baseAddress = "http://*:20000/";
#endif

            using (WebApp.Start <Startup>(url: baseAddress))
            {
                var result = DBServerMain.Init();

                if (result != ErrorCode.None)
                {
                    Console.WriteLine();
                    return;
                }

                Console.WriteLine("DB Server 실행 중 : " + baseAddress);
                Console.ReadLine();
            }
        }