From 998d8b3b319d48131e37c5565bb168dd3a1bb80e Mon Sep 17 00:00:00 2001 From: eko Date: Tue, 2 Dec 2025 16:13:28 +0700 Subject: [PATCH] serve from file instead of object --- pkgs/server/create.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/server/create.ts b/pkgs/server/create.ts index f3f8fb3..f2ff6d5 100644 --- a/pkgs/server/create.ts +++ b/pkgs/server/create.ts @@ -194,6 +194,7 @@ export const createServer = async () => { if (core[pathname]) content = core[pathname]; else if (site[pathname]) content = site[pathname]; else if (pub[pathname]) { + console.log(`[DEBUG] Serving file from public folder: ${pathname}`); // Serve file directly from public folder const filePath = dir(`public/${pathname}`); const file = Bun.file(filePath); @@ -230,6 +231,7 @@ export const createServer = async () => { } } + console.log(`[DEBUG] Serving file: ${pathname} with content type: ${opt?.headers?.get("Content-Type") || "unknown"}`); // Return the file directly (Bun will stream it efficiently) return new Response(file, { status: 200,