- serve REST endpoints under /api/v1 with root exceptions for health and mcp - move swagger UI to /docs and allow direct frontend calls via CORS - remove Vite proxy/hash routing and rely on env-driven VITE_API_URL
21 lines
581 B
TypeScript
21 lines
581 B
TypeScript
import { Controller, Get } from "@nestjs/common";
|
|
import { ApiOperation, ApiResponse, ApiTags } from "@nestjs/swagger";
|
|
|
|
@ApiTags("health")
|
|
@Controller()
|
|
export class HealthController {
|
|
@Get("health")
|
|
@ApiOperation({ summary: "Health check" })
|
|
@ApiResponse({ status: 200, description: "Service is healthy" })
|
|
health(): { status: string } {
|
|
return { status: "ok" };
|
|
}
|
|
|
|
@Get("healthz")
|
|
@ApiOperation({ summary: "Health check" })
|
|
@ApiResponse({ status: 200, description: "Service is healthy" })
|
|
healthz(): { status: string } {
|
|
return { status: "ok" };
|
|
}
|
|
}
|