express-mock-middleware

JSON →
library 0.0.6 ·javascript
verified May 27, 2026

A simple mock middleware for Express.js that allows you to define mock API responses in separate JavaScript files. Version 0.0.6 is the latest and stable release. It uses a glob pattern to load mock files (e.g., 'mock/**/*.js') where each file exports an object mapping HTTP methods and paths to handler functions. The middleware intercepts matching requests and returns mock data without requiring a real backend. It is a lightweight alternative to full mocking libraries, focusing on simplicity and ease of use. The package has minimal dependencies and is suitable for development and testing environments.

total hits 13
actors 5 distinct systems
last hit 2d ago AhrefsBot
MetaBot
4
GPTBot
2
Script
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇳🇱 Netherlands · 🇪🇸 Spain · 🇩🇪 Germany