Add up path
This commit is contained in:
parent
654dcbc065
commit
174e1ac2a9
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue