remove prefix
This commit is contained in:
parent
6f6a9562ee
commit
e5132b2270
1 changed files with 2 additions and 30 deletions
32
src/app.ts
32
src/app.ts
|
|
@ -25,35 +25,7 @@ const app = new Elysia()
|
|||
credentials: true,
|
||||
})
|
||||
)
|
||||
.use(
|
||||
swagger({
|
||||
path: "/docs",
|
||||
documentation: {
|
||||
info: {
|
||||
title: "Canvas API",
|
||||
version: "1.0.0",
|
||||
description: "Canvas API Documentation",
|
||||
},
|
||||
tags: [
|
||||
{ name: "Default", description: "Default endpoints" },
|
||||
{ name: "Projects", description: "All APIs related to Projects" },
|
||||
{ name: "Uploads", description: "All APIs related to Uploads" },
|
||||
{ name: "Auth", description: "Authentication related endpoints" },
|
||||
{ name: "Download", description: "Download count related endpoints" },
|
||||
],
|
||||
servers: [
|
||||
{
|
||||
url: ENV.SERVER_URL,
|
||||
description: "Canvas API Server",
|
||||
},
|
||||
],
|
||||
},
|
||||
processRoutes: (routes) => {
|
||||
console.log("Swagger found routes:", routes);
|
||||
return routes;
|
||||
},
|
||||
})
|
||||
)
|
||||
.use(swagger())
|
||||
.get("/test", () => "Hello World", {
|
||||
detail: {
|
||||
tags: ["Default"],
|
||||
|
|
@ -64,4 +36,4 @@ const app = new Elysia()
|
|||
.listen(ENV.SERVER_PORT);
|
||||
|
||||
console.log(`🦊 Elysia is running at ${ENV.SERVER_URL}`);
|
||||
console.log(`Swagger docs available at ${ENV.SERVER_URL}/docs`);
|
||||
console.log(`Swagger docs available at ${ENV.SERVER_URL}/swagger`);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue