https://github.com/zmofei/msession
A easy way to control session in nodejs
https://github.com/zmofei/msession
Last synced: 6 months ago
JSON representation
A easy way to control session in nodejs
- Host: GitHub
- URL: https://github.com/zmofei/msession
- Owner: zmofei
- Created: 2014-05-11T09:38:06.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-05-11T09:44:08.000Z (about 12 years ago)
- Last Synced: 2025-03-01T19:40:54.630Z (over 1 year ago)
- Size: 129 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
mSession
============
A easy way to control session in nodejs
Install
=======
`npm install msession`
Example
=======
```javascript
//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'
```