npm

Don't miss out on this year's npm Pride t-shirt designs!Order your favorites here »

express-etcd

1.2.2 • Public • Published

express-etcd

NPM

express-etcd is a Etcd session store for express backed by node-etcd

Installation

npm install express-etcd --save

Options

  • url Etcd host url or urls (either a string or an array)
  • directory Etcd directory to use (default express-session)
  • ttl time-to-live (expiration) in seconds that the key will last for. By default the maxAge of the session cookie will be used.
  • etcdOptions Object passed through to the node-etcd constructor

Usage

var session = require('express-session');
var EtcdStore = require('express-etcd');
var options = {
    url: ['foo.bar:2379', 'baz.bar:2379'],
    directory: 'mydir',
    etcdOptions: {
        timeout: 1000
    }
};
 
app.use(session({
    store: new EtcdStore(options),
    secret: 'banaanivarkaita',
    resave: false,
    saveUninitialized: true,
    cookie: { secure: true }
}));

License

http://ok.mit-license.org

Keywords

none

install

npm i express-etcd

Downloadsweekly downloads

62

version

1.2.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability