comment
This commit is contained in:
@@ -3,6 +3,11 @@ typedef struct {
|
|||||||
char *routename;
|
char *routename;
|
||||||
} route;
|
} 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)
|
char* state(int a)
|
||||||
{
|
{
|
||||||
return "{\"status\":1}";
|
return "{\"status\":1}";
|
||||||
|
|||||||
Reference in New Issue
Block a user