后端服务指定 ipv4 端口启动

This commit is contained in:
whyour 2024-06-02 17:53:37 +08:00
parent 07541569c5
commit a68f4b0cde
3 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ async function startServer() {
await require('./loaders/app').default({ expressApp: app }); await require('./loaders/app').default({ expressApp: app });
const server = app const server = app
.listen(config.port, () => { .listen(config.port, '0.0.0.0', () => {
Logger.debug(`✌️ 后端服务启动成功!`); Logger.debug(`✌️ 后端服务启动成功!`);
console.debug(`✌️ 后端服务启动成功!`); console.debug(`✌️ 后端服务启动成功!`);
process.send?.('ready'); process.send?.('ready');

View File

@ -21,7 +21,7 @@ app.get('/api/health', (req, res) => {
}); });
app app
.listen(config.publicPort, async () => { .listen(config.publicPort, '0.0.0.0', async () => {
await require('./loaders/sentry').default({ expressApp: app }); await require('./loaders/sentry').default({ expressApp: app });
await require('./loaders/db').default(); await require('./loaders/db').default();

View File

@ -12,7 +12,7 @@ async function startServer() {
await require('./loaders/update').default({ app }); await require('./loaders/update').default({ app });
app app
.listen(config.updatePort, () => { .listen(config.updatePort, '0.0.0.0', () => {
Logger.debug(`✌️ 更新服务启动成功!`); Logger.debug(`✌️ 更新服务启动成功!`);
console.debug(`✌️ 更新服务启动成功!`); console.debug(`✌️ 更新服务启动成功!`);
process.send?.('ready'); process.send?.('ready');