mongoose/examples/device-dashboard/main.c

16 lines
375 B
C
Raw Normal View History

2022-05-13 23:47:10 +08:00
// Copyright (c) 2020-2022 Cesanta Software Limited
2020-12-05 19:26:32 +08:00
// All rights reserved
#include "mongoose.h"
2022-05-15 21:40:58 +08:00
void device_dashboard_fn(struct mg_connection *, int, void *, void *);
2020-12-05 19:26:32 +08:00
int main(void) {
struct mg_mgr mgr;
mg_mgr_init(&mgr);
2022-05-15 21:40:58 +08:00
mg_http_listen(&mgr, "http://0.0.0.0:8000", device_dashboard_fn, &mgr);
for (;;) mg_mgr_poll(&mgr, 1000);
mg_mgr_free(&mgr);
2020-12-05 19:26:32 +08:00
return 0;
}