From 23f1f99468ad91d15a57a2cb95c8f4bbd2200ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Majdand=C5=BEi=C4=87?= Date: Wed, 29 Mar 2023 21:07:47 +0200 Subject: [PATCH] Implement ping endpoint --- src/HttpServer/HttpServer.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/HttpServer/HttpServer.ts b/src/HttpServer/HttpServer.ts index 851a6d6..c77a1b0 100644 --- a/src/HttpServer/HttpServer.ts +++ b/src/HttpServer/HttpServer.ts @@ -58,6 +58,10 @@ export class HttpServer { this.app.post('/api/center/processors', this.centerRequestHandler.doAddProcessor.bind(this.centerRequestHandler)); this.app.delete('/api/center/processors', this.centerRequestHandler.doRemoveProcessor.bind(this.centerRequestHandler)); + this.app.get('/api/ping', function (req: any, res: any) { + res.send('pong'); + }); + this.server = this.app.listen(SERVER_PORT, function () { // @ts-ignore this.logger.log1(`HTTPServer listening at http://localhost:${SERVER_PORT}`)