提交 b4ccbc635f0e2b332c3bde54a0bf42474a5a9a30

作者 Nick Baugh
1 个父辈 8e4dc1fa

fixed env config

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