mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-18 19:31:02 +00:00
Refactor device-dashboard
This commit is contained in:
1 parent
49a9bb5a8b
commit
58606e1702
29 files changed
+5123
-4476
No files matched your search
@@ -17,7 +17,7 @@ zephyr:
|
||||
|
||||
build:
|
||||
cp $(TOP_DIR)/mongoose.[ch] src/
|
||||
cp $(TOP_DIR)/examples/device-dashboard/net.c src/
|
||||
cp $(TOP_DIR)/examples/device-dashboard/net.[ch] src/
|
||||
cp $(TOP_DIR)/examples/device-dashboard/packed_fs.c src/
|
||||
$(DOCKER) west build $(BUILD_ARGS) -p auto $(realpath $(CURDIR)) $(OVERLAY)
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// All rights reserved
|
||||
|
||||
#include "mongoose.h"
|
||||
#include "net.h"
|
||||
|
||||
// Zephyr: Define a semaphore and network management callback to be able to wait
|
||||
// until our IP address is ready. The main function will start and block on this
|
||||
@@ -26,8 +27,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
mg_mgr_init(&mgr);
|
||||
|
||||
extern void device_dashboard_fn(struct mg_connection *, int, void *, void *);
|
||||
mg_http_listen(&mgr, "http://0.0.0.0:8000", device_dashboard_fn, NULL);
|
||||
web_init(&mgr);
|
||||
|
||||
// Start infinite event loop
|
||||
MG_INFO(("Mongoose version : v%s", MG_VERSION));
|
||||
|
||||
Reference in new issue
Block a user