Merge pull request #316 from To1ne/master

use `mg_set_request_handler`
This commit is contained in:
Sergey Lyubka 2014-02-04 11:55:52 -08:00
commit 1c914bde1d

View File

@ -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"));