nodemon + express, listen port =?
you too use define your for nodemon:
$ nodemon --inspect ./bin/www 3000
This also works: Include this in your app.js (it does the same thing as the neolivz4ever said)
app.set('port', process.env.PORT || 3000);
var server = app.listen(app.get('port'), function() {
console.log('Express server listening on port ' + server.address().port);
});
in package.json
"scripts":{
// "start": "node ./bin/www"
"start": "nodemon ./bin/www"
}
the following would now be equivalent:
$ npm start
$ nodemon ./bin/www