remove prefix

This commit is contained in:
smfahim25 2025-03-19 12:14:55 +06:00
parent 9550fc151b
commit eab5cf7e05
2 changed files with 50 additions and 15 deletions

View file

@ -25,10 +25,45 @@ const app = new Elysia()
credentials: true,
})
)
.get("/test", () => "Hello World", {})
.get("/test", () => "Hello World", {
detail: {
tags: ["Default"],
responses: {
200: {
description: "Success response",
},
},
},
})
.use(api)
.use(swagger())
.use(
swagger({
path: "/swagger",
documentation: {
openapi: "3.0.3",
info: {
title: "Canvas API",
version: "1.0.0",
description: "Canvas API Documentation",
},
servers: [
{
url: ENV.SERVER_URL,
description: "API server",
},
],
components: {
schemas: {},
securitySchemes: {},
},
},
swaggerOptions: {
persistAuthorization: true,
displayOperationId: true,
filter: true,
},
})
)
.listen(ENV.SERVER_PORT);
console.log(`🦊 Elysia is running at ${ENV.SERVER_URL}`);

View file

@ -1,4 +1,4 @@
import 'dotenv/config'
import "dotenv/config";
export const ENV = {
SERVER_URL: process.env.SERVER_URL,
@ -11,4 +11,4 @@ export const ENV = {
CLERK_SECRET_KEY: process.env.CLERK_SECRET_KEY,
JWT_ACCESS_TOKEN_SECRET: process.env.JWT_ACCESS_TOKEN_SECRET,
JWT_REFRESH_TOKEN_SECRET: process.env.JWT_REFRESH_TOKEN_SECRET,
}
};