feat: add health check
Summary: Test Plan:
This commit is contained in:
24
src/controllers/health-check/index.ts
Normal file
24
src/controllers/health-check/index.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { OpenAPIHono, createRoute } from "@hono/zod-openapi";
|
||||
|
||||
import { SuccessResponse, SuccessResponseSchema } from "~/types/schema";
|
||||
|
||||
const app = new OpenAPIHono();
|
||||
|
||||
const route = createRoute({
|
||||
method: "get",
|
||||
path: "/",
|
||||
responses: {
|
||||
200: {
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: SuccessResponseSchema(),
|
||||
},
|
||||
},
|
||||
description: "Retrieve the user",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
app.openapi(route, (c) => c.json(SuccessResponse, 200));
|
||||
|
||||
export default app;
|
||||
Reference in New Issue
Block a user