add api health check

This commit is contained in:
Raphael 2022-12-08 21:50:38 +01:00
parent fc0bfab6fb
commit eb53561fa3

View File

@ -34,6 +34,19 @@ function startBackendServer(port) {
app.use(express.static(path.join(__dirname, "..", "dist")));
app.use("/uploads", express.static(path.join(__dirname, "..", "public", "uploads")));
/**
* @api {get} /api/health Health Check
* @apiDescription This returns nothing but a status code of 200
* @apiName health
* @apiGroup WhiteboardAPI
*
* @apiSuccess {Number} 200 OK
*/
app.get("/api/health", function (req, res) {
res.status(200); //OK
res.end();
});
/**
* @api {get} /api/loadwhiteboard Get Whiteboard Data
* @apiDescription This returns all the Available Data ever drawn to this Whiteboard