Add server request debug logs
This commit is contained in:
+2
-1
@@ -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 });
|
||||||
|
|||||||
Reference in New Issue
Block a user