Commit 1c914bde authored by Sergey Lyubka's avatar Sergey Lyubka

Merge pull request #316 from To1ne/master

use `mg_set_request_handler`
parents 3987d4d5 a487332a
......@@ -32,7 +32,7 @@ int main(void) {
// Create and configure the server
server = mg_create_server(NULL);
mg_set_option(server, "listening_port", "8080");
mg_add_uri_handler(server, "/", index_html);
mg_set_request_handler(server, index_html);
// Serve request. Hit Ctrl-C to terminate the program
printf("Starting on port %s\n", mg_get_option(server, "listening_port"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment