hins111 commited on
Commit
95a2102
·
verified ·
1 Parent(s): e1b660f

Update main.ts

Browse files
Files changed (1) hide show
  1. main.ts +4 -2
main.ts CHANGED
@@ -571,5 +571,7 @@ async function handler(request: Request): Promise<Response> {
571
 
572
  // --- Start Server ---
573
  const PORT = 8000;
574
- console.log(`Listening on http://localhost:${PORT}/`);;
575
- Deno.serve({ port: PORT }, handler);;
 
 
 
571
 
572
  // --- Start Server ---
573
  const PORT = 8000;
574
+ const HOSTNAME = "0.0.0.0"; // 添加这一行
575
+
576
+ console.log(`Listening on http://${HOSTNAME}:${PORT}/`);; // 修改日志输出以反映正确的主机名
577
+ Deno.serve({ port: PORT, hostname: HOSTNAME }, handler);; // 在这里添加 hostname