Home

Awesome

session-file-store

Session file store for Express and Connect. Also you can use it with Koa

NPM Version NPM Downloads Node.js Version Build Status Coverage Status

Session file store is a provision for storing session data in the session file

Compatibility

Getting Started

Installation

$ npm install session-file-store

Running Tests

$ npm install
$ npm test

Options

Usage

Express or Connect integration

Due to express >= 4 changes, we need to pass express-session to the function session-file-store exports in order to extend session.Store:

var session = require('express-session');
var FileStore = require('session-file-store')(session);

var fileStoreOptions = {};

app.use(session({
    store: new FileStore(fileStoreOptions),
    secret: 'keyboard cat'
}));

Examples

You can find basic work app examples for express, connect and koa frameworks in examples folder.