Skip to content

Commit

Permalink
fix(server): grunt test was incorrectly using dev config, fixes #179
Browse files Browse the repository at this point in the history
  • Loading branch information
DaftMonk committed Apr 15, 2014
1 parent 9ea9c6d commit 62d8492
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions templates/common/Gruntfile.js
Expand Up @@ -7,9 +7,6 @@
// 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 @@ -29,7 +26,7 @@ module.exports = function (grunt) {
},
express: {
options: {
port: config.port
port: process.env.PORT || 9000
},
dev: {
options: {
Expand Down Expand Up @@ -91,7 +88,7 @@ module.exports = function (grunt) {
'{.tmp,<%%= yeoman.app %>}/scripts/{,*//*}*.js',
'<%%= yeoman.app %>/images/{,*//*}*.{png,jpg,jpeg,gif,webp,svg}'
],

options: {
livereload: true
}
Expand Down Expand Up @@ -189,7 +186,7 @@ module.exports = function (grunt) {
options: {
nodeArgs: ['--debug-brk'],
env: {
PORT: config.port
PORT: process.env.PORT || 9000
},
callback: function (nodemon) {
nodemon.on('log', function (event) {
Expand All @@ -200,7 +197,7 @@ module.exports = function (grunt) {
nodemon.on('config:update', function () {
setTimeout(function () {
require('open')('http://localhost:8080/debug?port=5858');
}, 500);
}, 500);
});
}
}
Expand Down Expand Up @@ -561,7 +558,7 @@ module.exports = function (grunt) {
'test:server',
'test:client'
]);
});
});

grunt.registerTask('build', [
'clean:dist',
Expand Down

0 comments on commit 62d8492

Please sign in to comment.