Mockbin is used internally and maintained by Kong, who also maintain the open-source API Gateway Kong.
- 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
brew install redis
brew services start redis
Redis should be now running on localhost:6379 Mockbin will start without redis but you wont be able to set or get response bins.
git clone https://github.com/Kong/mockbin.git ./mockbin
cd mockbin
cp .env.sample .env
brew install fnm
fnm use
npm install
Note: nvm, n or volta can be used instead of fnm.
npm start
# OR watch for changes
npm run dev
# OR with debug logs
DEBUG=mockbin npm run dev
docker compose up
Read the full API documentation, please review the API Docs.
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 http://editorconfig.org.
- update node
- github action
- autofix on save
- upsert bin endpoint
- simplify entrypoint and environment
- replace unirest with fetch
- redis function binding
- remove redis legacyMode
- callback tests
- add bin tests
- wild cards in url