Socket
Socket
Sign inDemoInstall

express-session-sqlite

Package Overview
Dependencies
73
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    express-session-sqlite

SQLite-backed session store for express-session written in Typescript


Version published
Weekly downloads
1.3K
increased by19.78%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

1.0.5 - Sun Mar 22 2020 20:15:21

Updated sqlite to 4.0.0-beta.6

Readme

Source

express-session-sqlite

npm version built with typescript JavaScript Style Guide CircleCI

A session store for express-session using SQLite.

Fully unit tested. PRs welcomed.

Install

$ npm i express-session-sqlite --save

Usage

import express from 'express'
import sqliteStoreFactory from 'express-session-sqlite'
import session from 'express-session'

const SqliteStore = sqliteStoreFactory(session)
const app = express()

app.use(session({
    store: new SqliteStore({
      // for in-memory database
      // path: ':memory:'
      path: '/tmp/sqlite.db',
      // Session TTL in milliseconds
      ttl: 1234,
      // (optional) Session id prefix. Default is no prefix.
      prefix: 'sess:',
      // (optional) Triggers a timer in milliseconds to run a cleanup on expired session rows.
      // Default is 5 minutes.
      cleanupInterval: 300000
    }),
    //... don't forget other expres-session options you might need
}))

Keywords

FAQs

Last updated on 22 Mar 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc