Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including mockbin with all npm packages installed. Try it out:

var mockbin = require("mockbin")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

mockbin v1.6.3

Test, mock, and track HTTP requests & responses between libraries, sockets and APIs

Mockbin version License

Build Status Downloads Code Climate Coverage Status Dependencies Gitter

Mockbin is used internally and maintained by Mashape, who also maintain the open-source API Gateway Kong.

Table of contents


  • uses HAR format
  • supports JSON, YAML, XML, HTML output
  • plays nice with proxies (uses the X-Forwarded-* headers for IP resolution)
  • allows for HTTP Method Override using the header X-HTTP-Method-Override or through query string parameter: _method
  • create custom bins for experimenting log collection


install from source or through npm:

npm install mockbin



read more on Installation.



read more on Installation.


other than the dependencies listed in package.json The following are required:


you will need to tell mockbin where Redis is:

npm config set mockbin:redis redis://

By Default the server will run on port 8080, you can customize the port like so:

npm config set mockbin:port 8001

read more on Configuration.


After installing the npm package you can now start the server like so:

npm start


  Usage: mockbin [options]


    -h, --help         output usage information
    -V, --version      output the version number
    -p, --port <port>  Port that the HTTP server will run on
    -r, --redis [dsn]  Redis dsn
    -q, --quiet        Disable console logging


Read the full API documentation, please review the API Docs.

Bugs and feature requests

Have a bug or a feature request? Please first read the issue guidelines and search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.


Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and notes on development.

More over, if your pull request contains JavaScript patches or features, you must include relevant unit tests.

Editor preferences are available in the editor config for easy use in common text editors. Read more and download plugins at


MIT © Mashape


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free