CONFIG.h
This commit is contained in:
6
CONFIG.h
Normal file
6
CONFIG.h
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef CONFIG_H_
|
||||||
|
#define CONFIG_H_
|
||||||
|
|
||||||
|
#define CONFIG_LISTEN_URL "http://0.0.0.0:8080"
|
||||||
|
|
||||||
|
#endif // CONFIG_H_
|
1
build.c
1
build.c
@ -23,6 +23,7 @@ int main(int argc, char ** argv)
|
|||||||
"./commit.h",
|
"./commit.h",
|
||||||
"./timer.c",
|
"./timer.c",
|
||||||
"./timer.h",
|
"./timer.h",
|
||||||
|
"./CONFIG.h",
|
||||||
|
|
||||||
"./mongoose.o",
|
"./mongoose.o",
|
||||||
"./gpp1",
|
"./gpp1",
|
||||||
|
3
main.c
3
main.c
@ -10,6 +10,7 @@
|
|||||||
#include "routes.h"
|
#include "routes.h"
|
||||||
#include "baked.h"
|
#include "baked.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
#include "CONFIG.h"
|
||||||
|
|
||||||
Route *route_hashtable = NULL;
|
Route *route_hashtable = NULL;
|
||||||
|
|
||||||
@ -132,7 +133,7 @@ int main(int argc, char ** argv)
|
|||||||
defer { free_route_hashtable(); }
|
defer { free_route_hashtable(); }
|
||||||
|
|
||||||
mg_wakeup_init(&mgr);
|
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 (;;) {
|
for (;;) {
|
||||||
mg_mgr_poll(&mgr, 1000);
|
mg_mgr_poll(&mgr, 1000);
|
||||||
|
Reference in New Issue
Block a user