Skip to content

Mock, Test & Track HTTP Requests and Responses.

License

Notifications You must be signed in to change notification settings

karux/mockbin

 
 

Repository files navigation

Insomnia Mockbin version License

Gitter

Insomnia 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

Requirements

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.

Running with Node

npm start
# OR watch for changes
npm run dev
# OR with debug logs
DEBUG=mockbin npm run dev

Running with Docker Compose

docker compose up

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

TODO

  • 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

About

Mock, Test & Track HTTP Requests and Responses.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • JavaScript 74.3%
  • Pug 19.5%
  • CSS 5.7%
  • Other 0.5%