2010-05-03 21:46:42 +01:00
|
|
|
#include "mongoose.h"
|
|
|
|
|
2010-05-05 00:36:23 +01:00
|
|
|
int main(void) {
|
2014-02-06 10:18:30 +00:00
|
|
|
struct mg_server *server = mg_create_server(NULL);
|
|
|
|
mg_set_option(server, "listening_port", "8080");
|
|
|
|
mg_set_option(server, "document_root", "chat_html_root");
|
2010-05-03 21:46:42 +01:00
|
|
|
|
2014-02-06 10:18:30 +00:00
|
|
|
printf("Starting on port %s\n", mg_get_option(server, "listening_port"));
|
|
|
|
for (;;) {
|
|
|
|
mg_poll_server(server, 1000);
|
2012-08-25 20:36:58 +01:00
|
|
|
}
|
2014-02-06 10:18:30 +00:00
|
|
|
mg_destroy_server(&server);
|
2010-05-03 21:46:42 +01:00
|
|
|
|
2014-02-06 10:18:30 +00:00
|
|
|
return 0;
|
2010-05-03 21:46:42 +01:00
|
|
|
}
|