Skip to content
Mock, Test & Track HTTP Requests and Response for Microservices
JavaScript HTML CSS Dockerfile
Branch: master
Clone or download

Latest commit

nijikokun chore(branding): update Mashape -> Kong (#85)
* chore(branding): update Mashape -> Kong

* docs(readme): remove redundant / broken badges

* docs(readme): remove redundant / broken badges

* fix(*) change Mashape -> Kong, mashape.com -> konghq.com
Latest commit 17b51c2 Aug 15, 2019

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Modify mockbin command to use env vars or custom npm config Nov 19, 2016
docs chore(branding): update Mashape -> Kong (#85) Aug 15, 2019
lib fix(bins): update har-validator to promise version Feb 12, 2016
src chore(branding): update Mashape -> Kong (#85) Aug 15, 2019
test refactor(dependencies): update dependencies Feb 12, 2016
.editorconfig let there be web views! Jan 23, 2015
.env.sample refactor(use debug-log + some code cleanup): Feb 12, 2016
.gitattributes restructuring and cleanups May 28, 2015
.gitignore process forking + dotenv Mar 31, 2015
.jshintrc maintenance Mar 31, 2015
.npmignore restructuring and cleanups May 28, 2015
.travis.yml chore(use semantic-release): Feb 12, 2016
CONTRIBUTING.md chore(branding): update Mashape -> Kong (#85) Aug 15, 2019
Dockerfile remove extra line Apr 9, 2015
LICENSE chore(branding): update Mashape -> Kong (#85) Aug 15, 2019
Procfile styling updates Mar 5, 2015
README.md
app.json chore(branding): update Mashape -> Kong (#85) Aug 15, 2019
package.json chore(branding): update Mashape -> Kong (#85) Aug 15, 2019
server.js

README.md

Mockbin version License

Build Status Downloads Dependencies Gitter

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

Table of contents

Features

  • 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

Installation

install from source or through npm:

npm install mockbin

Heroku

Deploy

read more on Installation.

Docker

Docker

read more on Installation.

Requirements

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

Configuration

you will need to tell mockbin where Redis is:

npm config set mockbin:redis redis://127.0.0.1:6379

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.

Running

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

npm start

Usage

  Usage: mockbin [options]

  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

Documentation

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.

Contributing

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 http://editorconfig.org.

License

MIT © Kong

You can’t perform that action at this time.