Esempio n. 1
0
        static void Main(string[] args)
        {
            string port = "65000";

            foreach (string arg in args)
                if (arg.ToLower().StartsWith("port="))
                    port = arg.Split("=".ToCharArray())[1];

            var addresses = new List<string>()
            {
                "http://" + GetIP().ToString() + ":" + port + "/",
                "http://localhost:" + port + "/",
                "http://127.0.0.1:" + port + "/"
            };

            Console.WriteLine("Host Name: " + Dns.GetHostName());
            addresses.ForEach(a => Console.WriteLine(a));

            server = new Server(addresses);
            RegisterControllers();
            server.Listen();
        }