Add API authentication

This commit is contained in:
KMKoushik
2024-04-09 17:05:47 +10:00
parent 4d0441791b
commit c34d219561
4 changed files with 62 additions and 20 deletions

View File

@@ -1,22 +1,8 @@
import { swaggerUI } from "@hono/swagger-ui";
import { getApp } from "./hono";
import getDomains from "./get_domains";
import getDomains from "./api/get_domains";
export const app = getApp();
getDomains(app);
// The OpenAPI documentation will be available at /doc
app.doc("/doc", {
openapi: "3.0.0",
info: {
version: "1.0.0",
title: "My API",
},
servers: [{ url: "/api/v1" }],
});
app.get("/ui", swaggerUI({ url: "/api/v1/doc" }));
export default app;