Express recipes
8 tested Express integration recipes with express-session, fetch-cookie, Helmet, express-rate-limit. Exact pinned versions and a last-passed receipt, last run 2026-10-15.
Express 5 + express-session login flow, e2e-style over real HTTP with a cookie jar
Session login/logout with express-session (regenerate on login, httpOnly cookies), tested end to end against a real listening server using fetch-cookie, no browser or Playwright.
Express 5 + Helmet + express-rate-limit hardening
Add security headers with Helmet and per-IP rate limiting with express-rate-limit to an Express 5 API.
Express 5 + jsonwebtoken auth middleware
Issue HS256 JWTs on login and protect routes with a bearer-token middleware.
Express 5 + Multer 2 file uploads with limits
Accept multipart file uploads in Express 5 with Multer memory storage, size limits and a MIME type filter.
Express 5 + Passport JWT strategy
Protect Express 5 routes with passport-jwt (bearer tokens signed by jsonwebtoken), stateless sessions and role checks.
Express 5 + pino-http structured request logging
Structured JSON request logs in Express 5 with pino-http: request ids, redacted auth headers and per-request child loggers.
Express 5 + Stripe webhook signature verification
Verify Stripe webhook signatures in Express 5 using the raw body, then dispatch on event type. Tested offline with generated test headers.
Express 5 + Zod 4 request validation
Validate JSON bodies in Express 5 with a reusable Zod middleware that returns 400 with field errors.
Used together with Express
express-sessionfetch-cookieHelmetexpress-rate-limitjsonwebtokenMulterpassportpassport-jwtpinopino-httpStripeZod