static void Main(string[] args) { MiniHttpServer server = new MiniHttpServer(8383); server.Route("^/$", "GET", IndexHandler); server.Route("^/index$", "POST", IndexHandler); server.Start(); Console.ReadKey(); server.Stop(); Console.ReadKey(); server.Start(); Console.ReadKey(); }
private void btnStart_Click(object sender, EventArgs e) { MiniHttpServer server = new MiniHttpServer(5, 8080); server.Route("/log", LogHandler); server.Start(); btnStart.Enabled = false; }
static void Main(string[] args) { MiniHttpServer server = new MiniHttpServer(8383); server.Route("^/$", "GET", IndexHandler); server.Route("^/index$", "POST", IndexHandler); server.Start(); Console.ReadKey(); server.Stop(); Console.ReadKey(); server.Start(); Console.ReadKey(); }