Permalink
Browse files

Update config.js

  • Loading branch information...
1 parent 06e7d17 commit b1aa3b01d65f1cc11f449038438c188ea4cf5653 @newghost committed Nov 12, 2015
Showing with 10 additions and 5 deletions.
  1. +0 −1 config.js
  2. +10 −4 svr/ourjs.js
View
@@ -53,7 +53,6 @@ var REDIS_CONFIG = {
, host : ''
, auth : ''
, select : 7
- , clean : false
};
/*
View
@@ -56,7 +56,9 @@ var User = require('./user') // 用户登录、注册
var init = function() {
client = redis.createClient(REDIS_CONFIG)
- client.select(REDIS_CONFIG.select)
+
+ REDIS_CONFIG.auth && client.auth(REDIS_CONFIG.auth)
+ REDIS_CONFIG.select && client.select(REDIS_CONFIG.select)
redblade.init({ schema: './schema', client: client }, function(err) {
/*
@@ -67,10 +69,14 @@ var init = function() {
var redisstore = RedisStore(client, WEBSVR_CONFIG.sessionTimeout / 1000)
app.sessionStore = redisstore
- //安装插件
+ //安装插件 addons
config.PLUGINS.forEach(function(plugin) {
- //addons
- require(plugin)
+ try {
+ require(path.join('../') + plugin)
+ console.log('Plugin loaded', plugin)
+ } catch (err) {
+ console.error('Cannot load plugin', plugin, err)
+ }
})
})
}

0 comments on commit b1aa3b0

Please sign in to comment.