提交 b4ccbc635f0e2b332c3bde54a0bf42474a5a9a30

作者 Nick Baugh
1 个父辈 8e4dc1fa

fixed env config

正在显示 2 个修改的文件 包含 3 行增加4 行删除
1 1
2 // # settings 2 // # settings
3 3
4 -var _ = require('underscore') 4 +var mergeDefaults = require('merge-defaults')
5 5
6 exports = module.exports = function(config) { 6 exports = module.exports = function(config) {
7 7
8 var settings = {} 8 var settings = {}
9 9
10 - _.defaults(settings, config.defaults)  
11 -  
12 var env = process.env.NODE_ENV || 'development' 10 var env = process.env.NODE_ENV || 'development'
13 11
14 - _.defaults(settings, config[env]) 12 + mergeDefaults(settings, config[env], config.defaults)
15 13
16 return settings 14 return settings
17 15
@@ -33,6 +33,7 @@ @@ -33,6 +33,7 @@
33 "express-session": "~1.1.0", 33 "express-session": "~1.1.0",
34 "jade": "~1.1.5", 34 "jade": "~1.1.5",
35 "less-middleware": "~0.1.15", 35 "less-middleware": "~0.1.15",
  36 + "merge-defaults": "^0.1.0",
36 "method-override": "~1.0.1", 37 "method-override": "~1.0.1",
37 "mongoose": "~3.8.7", 38 "mongoose": "~3.8.7",
38 "mongoose-json-select": "^0.2.1", 39 "mongoose-json-select": "^0.2.1",
注册登录 后发表评论