From d815c8d5579c86e1f6fe1501466d581bee6dc285 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 26 Aug 2023 20:37:46 -0600 Subject: [PATCH] Add a healthcheck endpoint --- src/endpoints/health.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/endpoints/health.ts diff --git a/src/endpoints/health.ts b/src/endpoints/health.ts new file mode 100644 index 0000000..1ffcd5b --- /dev/null +++ b/src/endpoints/health.ts @@ -0,0 +1,9 @@ +import { ServerRoute } from "@hapi/hapi"; + +const route: ServerRoute = { + method: `GET`, path: `/health`, + async handler(_, h) { + return h.response().code(204); + }, +}; +export default route; \ No newline at end of file