Skip to main content

Mocks Server

Node.js mock server running live, interactive mocks in place of real APIs

Quick and simple

Install it using NPM. Add files defining responses for the API routes. Start it with a single command. Change responses using settings, even while it is running.
Learn more →


Define routes using YAML, JSON, JavaScript or TypeScript. Configure Babel at your convenience for reading files. Or define routes programmatically. HTTP and HTTPS protocols are supported.
Learn more →


Use Express middlewares in routes. Define custom handlers for the routes. Add custom Express routers. Or create a plugin and have full access to the core JavaScript API.
Learn more →

Easy to control

Control it using the interactive CLI, or use the administration REST API, or start it using JavaScript and control everything. Other integrations are available, such as Cypress commands.
Learn more →

Main concepts

Three simple concepts allowing to simulate, control and storage multiple API scenarios

Routes schema


A route defines the url and method of an API resource. Wildcards can be used in urls and methods, so one route can simulate one real API resource, or many.
Variants schema


Each route can contain many different variants. Each variant, depending on its type, can define a response to send, or a middleware to execute, or a url to proxy the request, etc. The user can choose which variant has to be used by each route on each particular moment.
Collections schema


A collection of route variants defines all current routes and variants in the mocked API. They can be created extending other collections. So, you can store many collections and change the whole API behavior by simply changing the current one.


Works well with many ecosystems, and more are coming...


Show me the code

A simple example about how routes and variants can defined using different languages

- id: "get-user"
url: "/api/user/:id"
method: "GET"
delay: 1000
- id: "success"
type: "json"
status: 200
id: 1
name: "John Doe"
- id: "not-found"
type: "status"
status: 404
- id: "proxied"
type: "proxy"
host: ""

Upcoming features

Stay up to date on what we are working

Web user interface, mock WebSockets, Docker image, Open API integration, TypeScript definitions...

Give the project a star on GitHub

Do you like it? Let the community know