Add PUBLIC_IP env variable
This commit is contained in:
parent
3ad8cc3fe0
commit
77ac4066d9
2 changed files with 8 additions and 6 deletions
1
.env
1
.env
|
|
@ -3,6 +3,7 @@
|
|||
##################################
|
||||
|
||||
# Set the port for receiving connections
|
||||
PUBLIC_IP=
|
||||
PORT=3000
|
||||
AUTH_PORT=8070
|
||||
BILLING_PORT=8080
|
||||
|
|
|
|||
|
|
@ -94,8 +94,9 @@ app.use((err, req, res, next) => {
|
|||
|
||||
// Start server
|
||||
const port = process.env.PORT || 3000;
|
||||
app.listen(port, '0.0.0.0', () => {
|
||||
logger.info(`API listening on *:${port}`);
|
||||
logger.info(`Auth API listening on 127.0.0.1:${authPort}`);
|
||||
logger.info(`Billing API listening on 127.0.0.1:${billingPort}`);
|
||||
const publicIP = process.env.PUBLIC_IP || '0.0.0.0';
|
||||
app.listen(port, publicIP, () => {
|
||||
logger.info(`API listening on ${publicIP}:${port}`);
|
||||
logger.info(`Auth API listening on ${publicIP}:${authPort}`);
|
||||
logger.info(`Billing API listening on ${publicIP}:${billingPort}`);
|
||||
});
|
||||
Loading…
Add table
Reference in a new issue