New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@atroo/fastify-session-sqlite-store

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atroo/fastify-session-sqlite-store

A fastify session store using sqlite

latest
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

fastify-session-sqlite-store

SQLite session store for fastify.

This is basically a fork bumping versions to be installable.

It is meant to be used with @mgcrea/fastify-session and not the fastify/session plugin.

Purpose is mostly for local development as MemoryStore will lose all sessions with auto reload. It writes SQLite DB to the local filesystem, so it's not suited for production as it won't scale.

Install

npm install @atroo/fastify-session-sqlite-store

Usage

import fastifySession from '@mgcrea/fastify-session'
import {SQLiteStore} from "@atroo/fastify-session-sqlite-store"

const store = new SQLiteStore()

await fastify.register(fastifySession, {
  store,
  saveUninitialized: false,
  cookieName: 'session',
  cookie: { maxAge: SESSION_TTL, secure: false },
});

Misc

  • Relies on better-sqlite3 to interact with sqlite.
  • Built with TypeScript for static type checking with exported types along the library.

FAQs

Package last updated on 26 Mar 2025

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