From a487332aa0bf78c5d0502da316b91ef26850e63b Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Tue, 4 Feb 2014 20:48:38 +0100 Subject: [PATCH] use `mg_set_request_handler` --- examples/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/file.c b/examples/file.c index 568f7d67..86e4a768 100644 --- a/examples/file.c +++ b/examples/file.c @@ -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"));