From 44019e104289fedd32a867db00e9c6cb71b389cc Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Fri, 29 Aug 2025 10:07:17 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=A2=9E=E5=8A=A0=E5=81=A5=E5=BA=B7?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E6=8E=A2=E9=92=88=20=20/health/liveliness=20?= =?UTF-8?q?=E5=92=8C=20/health/readiness?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/controller/basic/health-controller.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 packages/ui/certd-server/src/controller/basic/health-controller.ts diff --git a/packages/ui/certd-server/src/controller/basic/health-controller.ts b/packages/ui/certd-server/src/controller/basic/health-controller.ts new file mode 100644 index 00000000..56901500 --- /dev/null +++ b/packages/ui/certd-server/src/controller/basic/health-controller.ts @@ -0,0 +1,21 @@ +import {Controller, Get, Provide} from '@midwayjs/core'; +import {BaseController, Constants} from '@certd/lib-server'; + +/** + */ +@Provide() +@Controller('/health') +export class HealthController extends BaseController { + + + @Get('/liveliness', { summary: Constants.per.guest }) + async liveliness(): Promise { + return this.ok('ok') + } + + @Get('/readiness', { summary: Constants.per.guest }) + async readiness(): Promise { + return this.ok('ok') + } + +}