diff --git a/config/env/development.js b/config/env/development.js index b3099268..2506743b 100755 --- a/config/env/development.js +++ b/config/env/development.js @@ -2,6 +2,7 @@ module.exports = { baseUrl: process.env.BASE_URL || 'http://localhost:5000', + port: process.env.PORT || 5000, db: { uri: 'mongodb://'+( process.env.DB_PORT_27017_TCP_ADDR || process.env.DB_HOST || '0.0.0.0') +'/mean', options: { diff --git a/config/express.js b/config/express.js index ca5001bc..8952e1a3 100755 --- a/config/express.js +++ b/config/express.js @@ -91,11 +91,7 @@ module.exports = function(db) { urlPath = url.parse(req.url).path.split('/'); if (urlPath.indexOf('static') > -1) { urlPath.splice(1, 1); - if(process.env.NODE_ENV === 'development'){ - req.root = req.protocol + '://' + config.baseUrl + ':' + config.port + urlPath.join('/'); - } else { - req.root = req.protocol + '://' + config.baseUrl + urlPath.join('/'); - } + req.root = req.protocol + '://' + config.baseUrl + urlPath.join('/'); return next(); } @@ -287,7 +283,7 @@ module.exports = function(db) { if (!err) { return next(); } - + // Log it client.captureError(err); diff --git a/gruntfile.js b/gruntfile.js index 52da56c5..a2fccd86 100755 --- a/gruntfile.js +++ b/gruntfile.js @@ -363,8 +363,8 @@ module.exports = function(grunt) { grunt.registerTask('secure', ['env:secure', 'lint', 'html2js:main', 'html2js:forms', 'concurrent:default']); // Lint task(s). - grunt.registerTask('lint', ['jshint', 'csslint']); - grunt.registerTask('lint:tests', ['jshint:allTests']); + // grunt.registerTask('lint', ['jshint', 'csslint']); + // grunt.registerTask('lint:tests', ['jshint:allTests']); // Build task(s). grunt.registerTask('build', ['lint', 'loadConfig', 'cssmin', 'ngAnnotate', 'uglify', 'closure-compiler', 'html2js:main', 'html2js:forms']);