initial fork version

- fixed missing port in verification link for dev env
- disable linting (existing code base > 1k jslint warning, generating
huge amount of logs & hiding other logs during build)
This commit is contained in:
abby 2017-08-01 10:58:27 +08:00
parent 3cc4478d24
commit 8098c3f4a6
3 changed files with 5 additions and 8 deletions

View file

@ -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: {

View file

@ -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);

View file

@ -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']);