commit 4306af760b09a7a9765644e17456f78a2a916985
parent 62ec400ef4507626404fff4cb63e5fdc05aaba23
Author: Henry Unite <unitehenry@gmail.com>
Date: Thu, 26 Feb 2026 08:39:12 +0000
refactor: health
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/app.ts b/app.ts
@@ -2,6 +2,7 @@ import express, { type Request, type Response } from "express";
import log from "./log.ts";
import message from './message.ts';
import voice from './voice.ts';
+import health from './health.ts';
import { prompt } from "./prompt.ts";
const app = express();
@@ -12,7 +13,7 @@ app.post("/voice", voice);
app.post("/message", message);
-app.get("/health", (req, res) => res.sendStatus(200));
+app.get("/health", health);
const port: number = parseInt(process.env.PORT || "3000", 10);
diff --git a/health.ts b/health.ts
@@ -0,0 +1 @@
+export default async (req: Request, res: Response): Promise<void> => res.sendStatus(200);