Initial commit
This commit is contained in:
11
artifacts/api-server/src/routes/health.ts
Normal file
11
artifacts/api-server/src/routes/health.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Router, type IRouter } from "express";
|
||||
import { HealthCheckResponse } from "@workspace/api-zod";
|
||||
|
||||
const router: IRouter = Router();
|
||||
|
||||
router.get("/healthz", (_req, res) => {
|
||||
const data = HealthCheckResponse.parse({ status: "ok" });
|
||||
res.json(data);
|
||||
});
|
||||
|
||||
export default router;
|
||||
8
artifacts/api-server/src/routes/index.ts
Normal file
8
artifacts/api-server/src/routes/index.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { Router, type IRouter } from "express";
|
||||
import healthRouter from "./health";
|
||||
|
||||
const router: IRouter = Router();
|
||||
|
||||
router.use(healthRouter);
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user