Formatted example

This commit is contained in:
Sergey Lyubka 2014-02-11 15:19:18 +00:00
parent e06976836f
commit c432b783fb

View File

@ -15,9 +15,9 @@ Here's a minimal application `app.c` that embeds mongoose:
#include "mongoose.h" #include "mongoose.h"
int main(void) { int main(void) {
struct mg_server *server = mg_create_server(NULL); struct mg_server *server = mg_create_server(NULL);
mg_set_option(server, "document_root", "."); // Serve current directory mg_set_option(server, "document_root", "."); // Serve current directory
mg_set_option(server, "listening_port", "8080"); // Open port 8080 mg_set_option(server, "listening_port", "8080"); // Open port 8080
for (;;) mg_poll_server(server, 1000); // Infinite loop, Ctrl-C to stop for (;;) mg_poll_server(server, 1000); // Infinite loop, Ctrl-C to stop
mg_destroy_server(&server); mg_destroy_server(&server);
return 0; return 0;
} }