#express
7 snippets tagged with #express
JWT Verify Middleware
Express middleware that verifies JWT tokens from the Authorization header and attaches the decoded payload to the request.
In-Memory Rate Limiter for Express
Token bucket rate limiter middleware for Express with configurable window and max requests per IP.
Async Error Handler Wrapper
Higher-order function that wraps async Express route handlers and forwards rejected promises to error middleware.
File Upload with Multer
Configure Multer for disk storage with file type validation, size limits, and unique filenames for Express.
Stream File Download
Express handler that streams a file to the client with proper headers, range support, and error handling.
Express Zod Request Validation
Validate Express request body, params, and query with Zod schemas via reusable middleware.
Health Check Endpoint with Dependency Checks
Express health check endpoint that verifies database, Redis, and disk connectivity with status reporting.