mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-02 14:32:56 +07:00
use mg_set_request_handler
This commit is contained in:
+1
-1
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user