diff --git a/back/app.ts b/back/app.ts index c0341973..c8c94526 100644 --- a/back/app.ts +++ b/back/app.ts @@ -15,7 +15,7 @@ async function startServer() { await require('./loaders/app').default({ expressApp: app }); const server = app - .listen(config.port, () => { + .listen(config.port, '0.0.0.0', () => { Logger.debug(`✌️ 后端服务启动成功!`); console.debug(`✌️ 后端服务启动成功!`); process.send?.('ready'); diff --git a/back/public.ts b/back/public.ts index d8ff6ba9..2eececd9 100644 --- a/back/public.ts +++ b/back/public.ts @@ -21,7 +21,7 @@ app.get('/api/health', (req, res) => { }); app - .listen(config.publicPort, async () => { + .listen(config.publicPort, '0.0.0.0', async () => { await require('./loaders/sentry').default({ expressApp: app }); await require('./loaders/db').default(); diff --git a/back/update.ts b/back/update.ts index 22d84891..a9d7f270 100644 --- a/back/update.ts +++ b/back/update.ts @@ -12,7 +12,7 @@ async function startServer() { await require('./loaders/update').default({ app }); app - .listen(config.updatePort, () => { + .listen(config.updatePort, '0.0.0.0', () => { Logger.debug(`✌️ 更新服务启动成功!`); console.debug(`✌️ 更新服务启动成功!`); process.send?.('ready');