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`);