Skip to content

Commit

Permalink
fix(config): fix issue where config.ip is undefined in non-producti…
Browse files Browse the repository at this point in the history
…on 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.
  • Loading branch information
zfarrell committed May 21, 2014
1 parent 2641e3e commit 087f5bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions templates/express/config/env/all.js
Expand Up @@ -6,6 +6,7 @@ var rootPath = path.normalize(__dirname + '/../../..');

module.exports = {
root: rootPath,
ip: '0.0.0.0',
port: process.env.PORT || 9000<% if (mongo) { %>,
mongo: {
options: {
Expand Down

0 comments on commit 087f5bc

Please sign in to comment.