This repository was archived by the owner on Aug 30, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ module.exports = {
8
8
googleAnalyticsTrackingID : process . env . GOOGLE_ANALYTICS_TRACKING_ID || 'GOOGLE_ANALYTICS_TRACKING_ID'
9
9
} ,
10
10
port : process . env . PORT || 3000 ,
11
+ host : process . env . HOST || '0.0.0.0' ,
11
12
templateEngine : 'swig' ,
12
13
// Session Cookie settings
13
14
sessionCookie : {
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ module.exports = {
7
7
certificate : './config/sslcerts/cert.pem'
8
8
} ,
9
9
port : process . env . PORT || 8443 ,
10
+ // Binding to 127.0.0.1 is safer in production.
11
+ host : process . env . HOST || '0.0.0.0' ,
10
12
db : {
11
13
uri : process . env . MONGOHQ_URL || process . env . MONGOLAB_URI || 'mongodb://' + ( process . env . DB_1_PORT_27017_TCP_ADDR || 'localhost' ) + '/mean' ,
12
14
options : {
Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ module.exports.start = function start(callback) {
37
37
38
38
_this . init ( function ( app , db , config ) {
39
39
40
- // Start the app by listening on <port>
41
- app . listen ( config . port , function ( ) {
40
+ // Start the app by listening on <port> at <host>
41
+ app . listen ( config . port , config . host , function ( ) {
42
42
43
43
// Logging initialization
44
44
console . log ( '--' ) ;
You can’t perform that action at this time.
0 commit comments