Skip to content

Commit 087f5bc

Browse files
committed
fix(config): fix issue where config.ip is undefined in non-production environments
This is somewhat of a small issue discovered by @chair9design: #205 (comment). `config.ip` is only defined in the production 'env' config file, so when running the server in any other environment (specifically development), no ip is passed to either `app.listen` or `console.log`(within server.js). From what i can tell, passing a null hostname to app.listen (which calls [server.listen](http://nodejs.org/api/http.html#http_server_listen_port_hostname_backlog_callback) ) is not an issue. However, since we are directly using this config variable in server.js, it seems like we should default it to something.
1 parent 2641e3e commit 087f5bc

File tree

1 file changed

+1
-0
lines changed
  • templates/express/config/env

1 file changed

+1
-0
lines changed

Diff for: templates/express/config/env/all.js

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ var rootPath = path.normalize(__dirname + '/../../..');
66

77
module.exports = {
88
root: rootPath,
9+
ip: '0.0.0.0',
910
port: process.env.PORT || 9000<% if (mongo) { %>,
1011
mongo: {
1112
options: {

0 commit comments

Comments
 (0)