vs JSON Server
JSON Server turns a data file into mock CRUD. Instant Express turns a route config into a real API with auth templates and custom handlers.
v1.1.0 · npm: express-instant
Clarity over complexity. Define routes, middleware, JWT auth, and MongoDB through a single config file — steal the speed of Express, skip the boilerplate.
npm install express-instant
const config = {
"port": 3000,
"mongoDB": true,
"routes": {
"/health": { "GET": { "type": "template", "template": "health" } },
"/auth/sign-up": { "POST": { "type": "template", "template": "signUp" } }
}
};
// npx express-instant --config-file my-api.json
JSON Server turns a data file into mock CRUD. Instant Express turns a route config into a real API with auth templates and custom handlers.
Those are full platforms with admin UIs. Instant Express is an
npm install library — you own Express, MongoDB, and your JSON config.
Use npx express-instant or import
createApp in code. Register your own templates and middleware when you outgrow the defaults.
Templates for 80% of routes. function, module, and
import handlers for the rest — no lock-in.
Declare REST endpoints in JSON. Static files, nested routers, inline functions, ES modules, or built-in templates — one config, zero ceremony.
Drop-in signUp and signIn handlers with bcrypt,
JWT, and MongoDB. Validators included. Production-shaped from day one.
Thin layer over Express — you keep the Node.js you know. No magic runtime, no codegen. Just config → listen.
Composable handler templates: health checks, CRUD collections, MongoDB services. Extend with your own modules like any Express middleware.
npm install express-instantslices.example.json → my-api.jsonnpx express-instant --config-file my-api.jsoncurl http://localhost:3000/health
# → { "success": true, "status": "healthy", "uptime": ... }
| Template | Method | Description |
|---|---|---|
health | GET | Health check + uptime |
signUp | POST | Register user, hash password, JWT |
signIn | POST | Authenticate and return JWT |
listItems | CRUD | In-memory collection REST |
mongoItems | CRUD | MongoDB collection REST |
requireAuth | middleware | JWT Bearer guard for protected routes |
echo | WebSocket | Connect + echo messages |
Config reference, route types, templates, WebSockets, and environment variables.
View documentation