static void Main(string[] args)
        {
            SimpleHTTPServer server;
            string           path;

            Console.WriteLine("Specify the folder with your web-application:");
            path = Console.ReadLine();
            Console.WriteLine("Enter '/exit' to close the server...\n");

            server = new SimpleHTTPServer(path);

            while (Console.ReadLine() != "/exit")
            {
                Console.WriteLine("Enter '/exit' to close the server...");
            }

            server.Stop();
        }
Example #2
0
        static void Main(string[] args)
        {
            Console.Write("HTTP SERVER\n");
            SimpleHTTPServer server;
            string           path;

            //C:\Users\agcl3\OneDrive\Рабочий стол\Новая папка\http.html
            Console.WriteLine("Enter Path");
            path = Console.ReadLine();
            Console.WriteLine("Enter end to exit\n");

            server = new SimpleHTTPServer(path);

            while (Console.ReadLine() != "end")
            {
                Console.WriteLine("Enter end to exit\n");
            }

            server.Stop();
        }