remove prefix

This commit is contained in:
smfahim25 2025-03-19 11:53:31 +06:00
parent dee2bf2fc0
commit d4a1cd4369
2 changed files with 3 additions and 2 deletions

View file

@ -6,7 +6,6 @@ import { authRoute } from "./auth/auth.route";
import { downloadRoute } from "./downloadCount/download.count.route";
export const api = new Elysia({ prefix: "" })
.use(swagger())
.get("/", () => {
console.log("Root endpoint accessed");
return "Hello from PlanPostAI Canvas API";
@ -15,6 +14,7 @@ export const api = new Elysia({ prefix: "" })
.use(projectRoutes)
.use(uploadRoutes)
.use(downloadRoute)
.use(swagger())
.onError(({ code, error, set }) => {
console.error(`API Error: ${code}`, error);
if (code === "NOT_FOUND") {

View file

@ -25,9 +25,10 @@ const app = new Elysia()
credentials: true,
})
)
.use(swagger())
.get("/test", () => "Hello World", {})
.use(api)
.use(swagger())
.listen(ENV.SERVER_PORT);
console.log(`🦊 Elysia is running at ${ENV.SERVER_URL}`);