Calmlo commited on
Commit
1224f69
·
verified ·
1 Parent(s): d988b84

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +5 -5
server.js CHANGED
@@ -329,14 +329,14 @@ app.post('/v1/chat/completions', async (req, res) => {
329
  }
330
  });
331
 
332
- // 启动服务器 (更新启动信息)
333
- app.listen(PORT, () => {
334
  console.log(`===================================================`);
335
- console.log(` Fal OpenAI Proxy Server (System Top + Separator + Recency)`); // 更新策略名称
336
- console.log(` Listening on port: ${PORT}`);
337
  console.log(` Using Limits: System Prompt=${SYSTEM_PROMPT_LIMIT}, Prompt=${PROMPT_LIMIT}`);
338
  console.log(` Fal AI Key Loaded: ${FAL_KEY ? 'Yes' : 'No'}`);
339
- console.log(` Chat Completions Endpoint: POST http://localhost:${PORT}/v1/chat/completions`);
340
  console.log(` Models Endpoint: GET http://localhost:${PORT}/v1/models`);
341
  console.log(`===================================================`);
342
  });
 
329
  }
330
  });
331
 
332
+ // 需要修改成嘅版本 (加咗 '0.0.0.0')
333
+ app.listen(PORT, '0.0.0.0', () => {
334
  console.log(`===================================================`);
335
+ console.log(` Fal OpenAI Proxy Server (System Top + Separator + Recency)`);
336
+ console.log(` Listening on host 0.0.0.0, port: ${PORT}`); // <-- 最好改埋 log 方便確認
337
  console.log(` Using Limits: System Prompt=${SYSTEM_PROMPT_LIMIT}, Prompt=${PROMPT_LIMIT}`);
338
  console.log(` Fal AI Key Loaded: ${FAL_KEY ? 'Yes' : 'No'}`);
339
+ console.log(` Chat Completions Endpoint: POST http://localhost:${PORT}/v1/chat/completions`); // Log 顯示 localhost 冇問題,實際監聽係 0.0.0.0
340
  console.log(` Models Endpoint: GET http://localhost:${PORT}/v1/models`);
341
  console.log(`===================================================`);
342
  });