Mockbin Save

Insomnia Mockbin is the underlying backend for the API mocks capability of Insomnia. It is built and used by Kong, the author of the open-source Kong Gateway.

Project README

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
Open Source Agenda is not affiliated with "Mockbin" Project. README Source: Kong/insomnia-mockbin
Stars
2,024
Open Issues
45
Last Commit
2 weeks ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating