提交 50519ee5622c17bd53a69c4426943598e9534e7f

作者 Bruno Bernardino
1 个父辈 1bf63dd7

Update Readme.md

Adding info about `boot/local.js`
正在显示 1 个修改的文件 包含 35 行增加0 行删除
@@ -87,6 +87,41 @@ exports['@singleton'] = true @@ -87,6 +87,41 @@ exports['@singleton'] = true
87 87
88 ``` 88 ```
89 89
  90 +You can have a `boot/local.js` with local settings if you need something unversioned (and load it by doing `$ export NODE_ENV=local`).
  91 +
  92 +```js
  93 +// boot/local.js
  94 +
  95 +var path = require('path')
  96 +var uploadsDir = path.join(__dirname, '..', 'uploads')
  97 +var maxAge = 30 * 24 * 60 * 60 * 1000
  98 +
  99 +exports = module.exports = function() {
  100 +
  101 + return {
  102 + local: {
  103 + uploadsDir: uploadsDir,
  104 + server: {
  105 + host: '0.0.0.0',
  106 + env: 'local',
  107 + port: 3003,
  108 + },
  109 + mongo: {
  110 + dbname: 'igloo-local',
  111 + },
  112 + redis: {
  113 + prefix: 'igloo-local',
  114 + maxAge: maxAge
  115 + }
  116 + }
  117 +
  118 + }
  119 +
  120 +}
  121 +
  122 +exports['@singleton'] = true
  123 +```
  124 +
90 125
91 ```js 126 ```js
92 // app.js 127 // app.js
注册登录 后发表评论