mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-25 03:29:00 +08:00
16 lines
377 B
C
16 lines
377 B
C
#include "mongoose.h"
|
|
|
|
int main(void) {
|
|
struct mg_server *server = mg_create_server(NULL);
|
|
mg_set_option(server, "listening_port", "8080");
|
|
mg_set_option(server, "document_root", "chat_html_root");
|
|
|
|
printf("Starting on port %s\n", mg_get_option(server, "listening_port"));
|
|
for (;;) {
|
|
mg_poll_server(server, 1000);
|
|
}
|
|
mg_destroy_server(&server);
|
|
|
|
return 0;
|
|
}
|