...
|
...
|
@@ -19,7 +19,7 @@ const cookieParser = require('cookie-parser'); |
|
|
const favicon = require('serve-favicon');
|
|
|
const session = require('express-session');
|
|
|
|
|
|
// const memcached = require('connect-memcached');
|
|
|
const memcached = require('connect-memcached');
|
|
|
const hbs = require('express-handlebars');
|
|
|
const pkg = require('./package.json');
|
|
|
|
...
|
...
|
@@ -27,7 +27,7 @@ const yohoLib = require('yoho-node-lib'); |
|
|
|
|
|
const app = express();
|
|
|
|
|
|
// const MemcachedStore = memcached(session);
|
|
|
const MemcachedStore = memcached(session);
|
|
|
|
|
|
// 全局注册library
|
|
|
yohoLib.global(config);
|
...
|
...
|
@@ -65,12 +65,12 @@ app.use(session({ |
|
|
cookie: {
|
|
|
domain: 'yohobuy.com',
|
|
|
httpOnly: false
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// store: new MemcachedStore({
|
|
|
// hosts: config.memcache.session,
|
|
|
// prefix: 'yohobuy_session:'
|
|
|
// })
|
|
|
store: new MemcachedStore({
|
|
|
hosts: config.memcache.session,
|
|
|
prefix: 'yohobuy_session:'
|
|
|
})
|
|
|
}));
|
|
|
|
|
|
app.use((req, res, next) => {
|
...
|
...
|
|