Merge pull request #1 from abby-ng/initial-version
initial fork version
This commit is contained in:
commit
411a4d497f
1
config/env/development.js
vendored
1
config/env/development.js
vendored
|
@ -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: {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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']);
|
||||
|
|
Loading…
Reference in a new issue