From 4fe9b654f59f381e17f362f00669bd4288e9ac7a Mon Sep 17 00:00:00 2001 From: peanut996 <849421294godw@gmail.com> Date: Wed, 20 Mar 2024 13:42:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0health=20check=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/routes/index.ts | 4 +++- src/api/routes/ping.ts | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/api/routes/ping.ts diff --git a/src/api/routes/index.ts b/src/api/routes/index.ts index 0bf9ca9..2e44386 100644 --- a/src/api/routes/index.ts +++ b/src/api/routes/index.ts @@ -1,5 +1,7 @@ import chat from "./chat.ts"; +import ping from "./ping.ts"; export default [ - chat + chat, + ping ]; \ No newline at end of file diff --git a/src/api/routes/ping.ts b/src/api/routes/ping.ts new file mode 100644 index 0000000..dc9af72 --- /dev/null +++ b/src/api/routes/ping.ts @@ -0,0 +1,6 @@ +export default { + prefix: '/ping', + get: { + '': async () => "pong" + } +} \ No newline at end of file