From 2b8970909a5446f5fad78541ae495f07fa9bf0e2 Mon Sep 17 00:00:00 2001 From: smfahim25 Date: Thu, 20 Mar 2025 14:19:34 +0600 Subject: [PATCH] try to solve --- src/app.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app.ts b/src/app.ts index da96f07..a021f84 100644 --- a/src/app.ts +++ b/src/app.ts @@ -28,6 +28,10 @@ const app = new Elysia() }) ) .get("/test", () => "Hello World", {}) + .post("/test-post", ({ body }) => { + console.log("Received POST with body:", body); + return { success: true, received: body }; + }) .use(api) .use( swagger({ @@ -44,8 +48,5 @@ const app = new Elysia() ) .listen(ENV.SERVER_PORT); -app.onRequest((request) => { - console.log(`${request.method} ${request.url}`); -}); console.log(`🦊 Elysia is running at ${ENV.SERVER_URL}`); console.log(`Swagger docs available at ${ENV.SERVER_URL}/swagger`);