This commit is contained in:
kamkow1
2025-06-19 15:52:47 +02:00
parent 6cfeae7a0d
commit 5c125f7ca8
3 changed files with 9 additions and 1 deletions

6
CONFIG.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef CONFIG_H_
#define CONFIG_H_
#define CONFIG_LISTEN_URL "http://0.0.0.0:8080"
#endif // CONFIG_H_

View File

@ -23,6 +23,7 @@ int main(int argc, char ** argv)
"./commit.h",
"./timer.c",
"./timer.h",
"./CONFIG.h",
"./mongoose.o",
"./gpp1",

3
main.c
View File

@ -10,6 +10,7 @@
#include "routes.h"
#include "baked.h"
#include "timer.h"
#include "CONFIG.h"
Route *route_hashtable = NULL;
@ -132,7 +133,7 @@ int main(int argc, char ** argv)
defer { free_route_hashtable(); }
mg_wakeup_init(&mgr);
mg_http_listen(&mgr, "http://localhost:8080", &event_handler, NULL);
mg_http_listen(&mgr, CONFIG_LISTEN_URL, &event_handler, NULL);
for (;;) {
mg_mgr_poll(&mgr, 1000);