Skip to content

Commit

Permalink
chroe: update config
Browse files Browse the repository at this point in the history
  • Loading branch information
sinchang committed Mar 9, 2018
1 parent 95ffefa commit 63d9beb
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions config/config.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,37 @@ module.exports = appInfo => {
ADMIN_USER: true,
};

// database
config.redis = {
client: {
host: process.env.EGG_REDIS_HOST || '127.0.0.1',
port: process.env.EGG_REDIS_PORT || 6379,
password: process.env.EGG_REDIS_PASSWORD || '',
db: process.env.EGG_REDIS_DB || '0',
},
};

/**
* @see http://mongodb.github.io/node-mongodb-native/2.2/api/Db.html#createCollection
*/
config.mongoose = {
url: process.env.EGG_MONGODB_URL || 'mongodb://127.0.0.1:27017/egg_cnode',
options: {
server: { poolSize: 20 },
},
};

// passport
config.passportGithub = {
key: process.env.EGG_PASSPORT_GITHUB_CLIENT_ID || 'test',
secret: process.env.EGG_PASSPORT_GITHUB_CLIENT_SECRET || 'test',
};

config.passportLocal = {
usernameField: 'name',
passwordField: 'pass',
};

// 邮箱配置
config.mail_opts = {
host: 'smtp.163.com',
Expand Down

0 comments on commit 63d9beb

Please sign in to comment.