# jdesboeufs/connect-mongo

MongoDB session store for Express

Repository: https://github.com/jdesboeufs/connect-mongo
Canonical: https://ross.abutalabs.com/products/connect-mongo
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2025-12-04T14:55:19+00:00

## Health v2 (maintenance only)
Score: 54/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 55, release rhythm 27, longevity 100
- inputs: {"age_days": 5657, "days_push": 272, "days_rel": 276, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1972, forks 337 (observed 2026-08-28T04:06:00.939785+00:00)

## What it is
connect-mongo is a MongoDB-backed session store for Connect and Express, written in TypeScript. It persists server-side sessions in MongoDB with support for automatic expiration cleanup, lazy session updates, and transparent session data encryption.

## Use cases
- store express sessions in mongodb
- persist user sessions across server restarts
- share sessions across multiple node.js server instances
- automatically clean up expired sessions
- encrypt session data at rest in mongodb
- replace in-memory session store with a durable one

## When to choose
- you run an Express or Connect app and need durable, scalable session storage
- you deploy multiple server instances and need a shared session store
- you want MongoDB TTL indexes to handle session expiration automatically
- you need encrypted session payloads

## When to avoid
- you use a framework other than Express/Connect
- you prefer Redis or another session store backend
- your app is a small single-instance prototype where in-memory sessions suffice
- you are not using MongoDB in your stack

## Facets
- artifact type: library
- maturity: active
- function: middleware, caching, database-driver, security
- domain: web-development, backend, databases, developer-tools
- platform: -
- tags: session-store, express, connect, mongodb, typescript, session-management, nodejs, web-server

## Member repositories
- jdesboeufs/connect-mongo (main) score 54

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:00.939785+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:05:02.359927+00:00, confidence not recorded.
  - readme: https://github.com/jdesboeufs/connect-mongo (fetched 2026-08-28T04:06:00.939785+00:00, sha 08465d607b77)
  - registry_npm: https://registry.npmjs.org/connect-mongo (fetched 2026-08-29T10:44:40.716645+00:00, sha fd1a853b795f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
