Add server request debug logs

This commit is contained in:
2026-09-20 19:23:27 +01:00
parent 79433168df
commit 8535a52830
+2 -1
View File
@@ -13,10 +13,11 @@ const port = SiteData["ServerPort"];
await bunext.bunextInit(); await bunext.bunextInit();
const server = Bun.serve({ const server = Bun.serve({
hostname: development ? undefined : "0.0.0.0", hostname: "0.0.0.0",
async fetch(req, server) { async fetch(req, server) {
try { try {
const url = new URL(req.url); const url = new URL(req.url);
console.log(`[HTTP] ${req.method} ${url.pathname}`);
if (url.pathname.startsWith("/media")) { if (url.pathname.startsWith("/media")) {
return await handleMediaServer({ req }); return await handleMediaServer({ req });