Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

connect-loki

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-loki

A Loki.js session store for Connect/Express

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14K
increased by29.61%
Maintainers
1
Weekly downloads
 
Created
Source

connect-loki

NPM version Build Status Codacy Badge Known Vulnerabilities License

A Loki.js session store for Connect/Express

Setup

npm install connect-loki express-session

Pass the express-session store into connect-loki to create a LokiStore constructor.

var session = require('express-session');
var LokiStore = require('connect-loki')(session);

var options = {}; // See available options below

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

Options

Setting the path to the database file is optional but recommended.

Available parameters:

  • path Path to the database file. Defaults to ./session-store.db
  • autosave Set false to disable save to disk. Defaults to true
  • ttl Duration in seconds to keep stale sessions. Set to 0 to disable TTL. Defaults to 1209600 (14 days)
  • logErrors Whether or not to log client errors. Defaults to false
    • If true, a default logging function (console.error) is provided.
    • If a function, it is called anytime an error occurs (useful for custom logging)
    • If false, no logging occurs.

License

MIT

Keywords

FAQs

Package last updated on 06 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc