Add up path

This commit is contained in:
Tyler Perkins 2022-04-29 14:02:33 -04:00
parent 654dcbc065
commit 174e1ac2a9
2 changed files with 13 additions and 1 deletions

View File

@ -79,7 +79,7 @@ Sample response
}
```
Special formatted responses
Special formatted responses and aliases
===========================
[GET] /uptime
@ -113,3 +113,9 @@ Sample response
---------------
* Returns redirect to /proc/sys/kernel/hostname
[GET] /up
---------
* Always returns a 200 OK
* Can be used for testing latency

View File

@ -102,6 +102,12 @@ void setRoutes(crow::SimpleApp& app){
return ret;
});
CROW_ROUTE(app, "/up")([](){
crow::json::wvalue ret;
ret["message"] = "Alive and well!";
return ret;
});
//catchall route
CROW_CATCHALL_ROUTE(app)([](){
crow::json::wvalue ret;