Bind news app to localhost for reverse proxy

This commit is contained in:
wuyanwanwu
2026-08-17 20:32:41 +08:00
parent cc310283e4
commit 9490a1ce54
5 changed files with 8 additions and 2 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ const { URL } = require('url');
const { Pool } = require('pg');
const PORT = Number(process.env.APP_PORT || 3000);
const HOST = process.env.APP_HOST || '0.0.0.0';
const PUBLIC_DIR = path.join(__dirname, 'public');
const ADMIN_TOKEN = process.env.APP_ADMIN_TOKEN || '';
@@ -306,7 +307,7 @@ const server = http.createServer(async (req, res) => {
}
});
server.listen(PORT, '0.0.0.0', () => {
server.listen(PORT, HOST, () => {
console.log(`Daily news digest web listening on ${PORT}`);
});