This commit is contained in:
Daniel Zapata
2022-09-11 11:06:27 -05:00
parent 321e4541bb
commit b56931a29f
+5
View File
@@ -3,6 +3,11 @@ typedef struct {
char *routename;
} route;
// TO ADD A ROUTE:
// 1. define a function that returns a char* here (that is the json content)
// 2. add a route declaration at the bottom
// like: `route stateR = { .routeFnPtr = &state, .routename = "/state.json"};`
char* state(int a)
{
return "{\"status\":1}";