Skip to content

Commit c8aa2d5

Browse files
committedMar 9, 2014
fix(gruntfile): update gruntfile to use port from config
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.
1 parent 202adfe commit c8aa2d5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎templates/common/Gruntfile.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
// use this if you want to recursively match all subfolders:
88
// 'test/spec/**/*.js'
99

10+
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
11+
var config = require('./lib/config/config');
12+
1013
module.exports = function (grunt) {
1114

1215
// Load grunt tasks automatically
@@ -26,7 +29,7 @@ module.exports = function (grunt) {
2629
},
2730
express: {
2831
options: {
29-
port: process.env.PORT || 9000
32+
port: config.port
3033
},
3134
dev: {
3235
options: {
@@ -186,7 +189,7 @@ module.exports = function (grunt) {
186189
options: {
187190
nodeArgs: ['--debug-brk'],
188191
env: {
189-
PORT: process.env.PORT || 9000
192+
PORT: config.port
190193
},
191194
callback: function (nodemon) {
192195
nodemon.on('log', function (event) {

0 commit comments

Comments
 (0)