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

connect-session-knex

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-session-knex

A knex.js session store for Express and Connect

  • 1.0.17
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
68K
decreased by-0.53%
Maintainers
1
Weekly downloads
 
Created
Source

Connect Session Knex

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

NPM

connect-session-knex is an express-session store backed by Postgres, MySQL, MariaDB or SQLite3, via the knex.js library.

Installation

$ npm install connect-session-knex

Usage

Example application using the defaults

Example application with PostgreSQL

With Express 3 or Connect

Options

  • tablename='sessions' Tablename to use. Defaults to 'sessions'.
  • knex knex instance to use. Defaults to a new knex instance, using sqlite3 with a file named 'connect-session-knex.sqlite'
  • clearInterval milliseconds between clearing expired sessions. Defaults to 60000.

If the table does not exist in the schema, this module will attempt to create it.

If a knex instance is not provided, this module will attempt to create a sqlite3 database, with a file named 'connect-session-knex.sqlite', in the working directory of the process.

This module does not create any indexes. You should create an index on the 'expired' column to make the session clearing efficient.

Benchmarks

https://github.com/llambda/express-session-benchmarks

FAQs

Package last updated on 07 Nov 2015

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