bripkens/connect-history-api-fallback
Fallback to index.html for applications that are using the HTML 5 history API observed · 2026-08-28
Health v2 · maintenance only
32/100
- Activity 0
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4855
- days_rel: n/a
- days_push: 1042
- n_releases_24m: 0
Adoption not part of the score
1855 stars · 151 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A small Node.js middleware for Connect and Express that rewrites requests to an index page (default /index.html) so Single Page Applications using the HTML5 History API don't get 404s on refresh or deep links. It only rewrites GET/HEAD requests that accept text/html and are not direct file requests.
Use cases
- fix 404 on page refresh in a single page app
- serve index.html for deep links with HTML5 history routing
- add history API fallback middleware to Express
- make React Router or Vue Router routes work on direct access
- configure SPA fallback for a dev server
- rewrite non-file GET requests to index.html
When to choose
- you host a SPA with client-side routing on a Connect or Express server and hit 404s on refresh or direct URL entry
- you need a tiny, configurable middleware with rewrite rules and custom index paths
When to avoid
- your server is nginx, Apache, or another static host with its own try_files/rewrite config
- you need server-side rendering or a full static site generator instead of a fallback
- your app is not a SPA using the HTML5 History API
Facets
library · maturity maintenance
middleware routing http-server web-development frontend backend spa html5-history-api express connect fallback single-page-applications nodejs web-server
2 sources
- readme: https://github.com/bripkens/connect-history-api-fallback · fetched 2026-08-28 · 9dbc04369b80
- registry_npm: https://registry.npmjs.org/connect-history-api-fallback · fetched 2026-08-29 · 9cb0b8be2c86
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| bripkens/connect-history-api-fallback | main | 32 |
For agents
markdown · JSON · MCP: product_card(name="bripkens/connect-history-api-fallback")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem