msession

0.0.3 • Public • Published

node-session

A easy way to control session in nodejs

Example

 
//require the session.js
var session = require('session.js');
 
//start the session.
//you must get the req,and res.
var sessionM = session.start(req, res);
 
//set Session
//.set(key,val,expTime);
sessionM.set('power','admin',1000*60*60*24)
 
//get Session
sessionM.get('power');
//return 'admin' 
 

Readme

Keywords

Package Sidebar

Install

npm i msession

Weekly Downloads

4

Version

0.0.3

License

MIT

Last publish

Collaborators

  • zhuwenlong