Bind news app to localhost for reverse proxy
This commit is contained in:
+2
-1
@@ -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}`);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user