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