Beispiel #1
0
    static void Main()
    {
        Console.WriteLine("Sample Rest Server Started");
        Console.WriteLine("The server implements /time REST method.");
        Console.WriteLine("Browse to http://localhost:9999/time to test it.\n");

        var log = new ConsoleLog((Log.Level.Off));
        var restServer = new SampleRestServer(log, 9999, 127, 0, 0, 1);
        restServer.StartAsync();

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

        restServer.Stop();
    }
Beispiel #2
0
    static void Main()
    {
        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.Verbose));
        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
    static void Main()
    {
        Console.WriteLine("Sample Rest Server Started");
        Console.WriteLine("The server implements /time REST method.");
        Console.WriteLine("Browse to http://localhost:9999/time to test it.\n");

        var log        = new ConsoleLog((Log.Level.Off));
        var restServer = new SampleRestServer(log, 9999, 127, 0, 0, 1);

        restServer.StartAsync();

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

        restServer.Stop();
    }
Beispiel #4
0
    static void Main()
    {
        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();
    }