Beispiel #1
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Sample Rest Server Started");
            Console.WriteLine("The server implements /time REST method.");
            Console.WriteLine("Browse to http://<host>:8080/time or http://<host>:8080/plaintext to test it.\n");

            var log = new ConsoleLog((Log.Level.Error));
            var restServer = new SampleRestServer(log, 8080, 0, 0, 0, 0);
            restServer.StartAsync();

            Console.WriteLine("Press ENTER to exit ...");
            Console.ReadLine();

            restServer.Stop();
        }
Beispiel #2
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Sample Rest Server Started");
            Console.WriteLine("The server implements /time REST method.");
            Console.WriteLine("Browse to http://<host>:8080/time or http://<host>:8080/plaintext to test it.\n");

            var log        = new ConsoleLog((Log.Level.Error));
            var restServer = new SampleRestServer(log, 8080, 0, 0, 0, 0);

            restServer.StartAsync();

            Console.WriteLine("Press ENTER to exit ...");
            Console.ReadLine();

            restServer.Stop();
        }
Beispiel #3
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Sample Rest Server Started");
            Console.WriteLine("Browse to http://<host>:8080/time, http://<host>:8080/plaintext, or http://<host>:8080/json to test it.\n");

            var log          = new ConsoleLog((Log.Level.Verbose));
            var cancellation = new CancellationTokenSource();

            var restServer = new SampleRestServer(cancellation.Token, log, 8080, 0, 0, 0, 0);

            restServer.StartAsync();

            Console.WriteLine("Press ENTER to exit ...");
            Console.ReadLine();

            cancellation.Cancel();
        }