# jaredhanson/connect-flash

Flash message middleware for Connect and Express.

Repository: https://github.com/jaredhanson/connect-flash
Canonical: https://ross.abutalabs.com/products/connect-flash
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2024-05-28T04:49:59+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 5283, "days_push": 827, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1236, forks 173 (observed 2026-08-28T04:04:05.038748+00:00)

## What it is
connect-flash is a middleware for Connect and Express that provides flash messages stored in the session and cleared after display. It restores the flash functionality removed in Express 3.x and works with any middleware-compatible framework.

## Use cases
- show success or error messages after a redirect in Express
- display one-time notifications to users across page loads
- add flash message support to Express 3.x apps
- show form validation feedback after POST-redirect-get
- display login failure messages with Passport

## When to choose
- you use Express 3.x or Connect and need session-based flash messages
- you want messages that persist through a redirect and disappear after display

## When to avoid
- you use Express 4/5, where req.flash is often replaced by other session-based flash packages
- your app has no session middleware and you don't want to add it
- you need client-side or non-session notifications

## Facets
- artifact type: library
- maturity: maintenance
- function: middleware, web-framework, state-management
- domain: web-development, backend, developer-tools
- platform: -
- tags: flash-messages, express, connect, session-messages, notifications, nodejs, web-server

## Member repositories
- jaredhanson/connect-flash (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:05.038748+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-30T08:21:59.048130+00:00, confidence not recorded.
  - readme: https://github.com/jaredhanson/connect-flash (fetched 2026-08-28T04:04:05.038748+00:00, sha f19f6ff37342)
  - registry_npm: https://registry.npmjs.org/connect-flash (fetched 2026-08-29T12:21:13.827651+00:00, sha 155c7a48feb1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
