예제 #1
0
 public KvServerFixture(string host, int port, string path)
 {
     _host     = host;
     _port     = port;
     _path     = path;
     _kvServer = KvServerFactory.Create(host, port, path);
 }
예제 #2
0
        private static void Main()
        {
            Console.WriteLine("Starting server... ");
            var host          = "localhost";
            var port          = 8080;
            var dataDirectory = AppDomain.CurrentDomain.BaseDirectory + "data\\";
            var kvServer      = KvServerFactory.Create(host, port, dataDirectory);

            kvServer.Start();
            Console.WriteLine("Server started.");
            Console.WriteLine($"Server data directory: {dataDirectory}");
            Console.WriteLine($"Check 'http://{host}:{port}/status' for server status.");
            while (true)
            {
            }

            // ReSharper disable once FunctionNeverReturns
        }