session-handler

2.0.3 • Public • Published

session-handler

A simple session handler and cookie parser for node using memcached for session storage.

Install

npm install

Documentation

TODO

Examples

var mem_options = require('./options.json')
  , memcached = require('memcached-wrapper')(mem_options)
  , ses_options = {'prefix':'test'}
  , sessions = require('./../index')(memcached, ses_options);
 
sessions.start(req, resp, function(err, resp) {
  // If no error, we have a valid session
  var value = sessions.get(':SESSION_NAME')
 
  sessions.set(':SESSION_NAME', 'bar', function (err, resp) {
    // If no error, session is now set and saved in memcached
  });
});

Test

Depends on mocha, run

make test

Readme

Keywords

Package Sidebar

Install

npm i session-handler

Weekly Downloads

0

Version

2.0.3

License

MIT

Last publish

Collaborators

  • simme