try to solve

This commit is contained in:
smfahim25 2025-03-20 14:19:34 +06:00
parent 018ad66e57
commit 2b8970909a

View file

@ -28,6 +28,10 @@ const app = new Elysia()
}) })
) )
.get("/test", () => "Hello World", {}) .get("/test", () => "Hello World", {})
.post("/test-post", ({ body }) => {
console.log("Received POST with body:", body);
return { success: true, received: body };
})
.use(api) .use(api)
.use( .use(
swagger({ swagger({
@ -44,8 +48,5 @@ const app = new Elysia()
) )
.listen(ENV.SERVER_PORT); .listen(ENV.SERVER_PORT);
app.onRequest((request) => {
console.log(`${request.method} ${request.url}`);
});
console.log(`🦊 Elysia is running at ${ENV.SERVER_URL}`); console.log(`🦊 Elysia is running at ${ENV.SERVER_URL}`);
console.log(`Swagger docs available at ${ENV.SERVER_URL}/swagger`); console.log(`Swagger docs available at ${ENV.SERVER_URL}/swagger`);