session-leanengine-store

0.2.1 • Public • Published

session-leanengine-store

Session leanengine store is a provision for storing session data in the leancloud

 
var express = require('express');
var path = require('path');
var AV = require('leanengine');
var session = require('express-session');
var SessionLeanengineStore = require('session-leanengine-store')(session, AV);
 
var app = express();
 
var sess = {
  secret: 'WFa7Yrsizs6dh',
  saveUninitialized: true,
  name: 'av.sid',
  resave: true,
  store: new SessionLeanengineStore(session)
};
 
if (app.get('env') !== 'development') {
  app.set('trust proxy', 1); // trust first proxy
  sess.cookie.secure = true; // serve secure cookies
}
 
app.use(session(sess));
 

Readme

Keywords

Package Sidebar

Install

npm i session-leanengine-store

Weekly Downloads

0

Version

0.2.1

License

none

Last publish

Collaborators

  • sliuqin