feat: add health check
Summary: Test Plan:
This commit is contained in:
20
src/index.ts
20
src/index.ts
@@ -1,9 +1,21 @@
|
||||
import { Hono } from "hono";
|
||||
import { OpenAPIHono } from "@hono/zod-openapi";
|
||||
|
||||
const app = new Hono();
|
||||
const app = new OpenAPIHono();
|
||||
|
||||
app.get("/", (c) => {
|
||||
return c.text("Hello Hono!");
|
||||
app.route(
|
||||
"/",
|
||||
await import("~/controllers/health-check").then(
|
||||
(controller) => controller.default,
|
||||
),
|
||||
);
|
||||
|
||||
// The OpenAPI documentation will be available at /doc
|
||||
app.doc("/doc", {
|
||||
openapi: "3.0.0",
|
||||
info: {
|
||||
version: "1.0.0",
|
||||
title: "Aniplay API",
|
||||
},
|
||||
});
|
||||
|
||||
export default app;
|
||||
|
||||
Reference in New Issue
Block a user