feat: 添加 NestJS API 基础设施

This commit is contained in:
root
2026-09-14 12:32:46 +08:00
parent c37101e783
commit f3fb16dbc0
22 changed files with 2213 additions and 5 deletions
+19
View File
@@ -0,0 +1,19 @@
import { Controller, Get, Inject } from "@nestjs/common";
import { HealthService } from "./health.service.js";
@Controller("health")
export class HealthController {
constructor(
@Inject(HealthService) private readonly healthService: HealthService,
) {}
@Get()
check(): Promise<{ status: "ok"; postgres: "up"; redis: "up" }> {
return this.healthService.check();
}
@Get("live")
live(): { status: "ok" } {
return { status: "ok" };
}
}