fortune-session

0.0.1 • Public • Published

fortune-session

This module is alpha quality.

Fortune.js-based session store for Express.

npm install --save fortune-session
const fortune = require('fortune');
const store = fortune({
    session : {
        sid  : String,
        data : Object
    }
} /* Here you can pass your preferred adapter. */ );
 
const session        = require('express-session');
const fortuneSession = require('fortune-session');
 
app.use(session({
    store : fortuneSession(session, store)
}));

fortuneSession(session, store, [collection])

  • session — express-session module.
  • store — Fortune.js store.
  • collection — optional, refers to collection/table with compatible schema, defaults to 'session'.

Schema

Specified collection/table must have the following schema:

  • sid — String, session id.
  • data — Object, session data.

TODO

  • Write tests.

License

MIT

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.12latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.12

Package Sidebar

Install

npm i fortune-session

Weekly Downloads

2

Version

0.0.1

License

MIT

Last publish

Collaborators

  • aliceklipper