Skip to content

Commit

Permalink
fix(gruntfile): update gruntfile to use port from config
Browse files Browse the repository at this point in the history
Although port is set in config/all.js, it is overridden by the values from the grunt config.

This change updates grunt (grunt-express & grunt-nodemon) to use the value from the config.
  • Loading branch information
zfarrell committed Mar 9, 2014
1 parent 202adfe commit c8aa2d5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions templates/common/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'

process.env.NODE_ENV = process.env.NODE_ENV || 'development';
var config = require('./lib/config/config');

module.exports = function (grunt) {

// Load grunt tasks automatically
Expand All @@ -26,7 +29,7 @@ module.exports = function (grunt) {
},
express: {
options: {
port: process.env.PORT || 9000
port: config.port
},
dev: {
options: {
Expand Down Expand Up @@ -186,7 +189,7 @@ module.exports = function (grunt) {
options: {
nodeArgs: ['--debug-brk'],
env: {
PORT: process.env.PORT || 9000
PORT: config.port
},
callback: function (nodemon) {
nodemon.on('log', function (event) {
Expand Down

0 comments on commit c8aa2d5

Please sign in to comment.