mockit

A tool to quickly mock out end points, setup delays and more...

Github星跟蹤圖

Travis
CodeCov
Netlify Status
MIT License
PRs Welcome
All Contributors

Watch on GitHub
Star on GitHub
Tweet

Donate ☕

Read the Docs, Edit the Docs

The problem

When building applications you often need to interact with services. When the services are not ready to be consumed you have a few options:

  1. Mock out the response with a JSON file
  2. Create a mock service yourself
  3. Use MockIt.

This solution

This tool was designed to help developers quickly create endpoints for their applications. No need to create a server, just use docker and run this project locally. You can create, edit and manage routes to your API. Every change to the API will be reflected on the server and updated straight away.

This tool comes with a few features out the box:

  • CORS
  • Basic Authentication
  • Chaos Monkey (Unleash a monkey to take down your endpoints)

More information about how it works, its features can be found on the docs.

Read the docs and get started

Getting Started

Make sure you have docker running

git clone https://github.com/boyney123/mockit.git
cd mockit && docker-compose up --build -d

Once everything is up and running go to http://localhost:5000 to see MockIt.

For instructions on how to use MockIt please see the documentation.

Permissions

If you get error: Couldn't connect to Docker daemon at http+docker://localhost - is it running? you might need run with sudo

sudo docker-compose up --build -d

Local install and running tests

If you want to install and run the tests for all apps then you can run this script:

sh install-and-test.sh

If you have any problems with permissions you might need to chmod the file

chmod +x install-and-test.sh && ./install-and-test.sh

Viewing the dashboard, server and API

Once Docker is running you have three applications running on the machine.

  1. The client: http://localhost:5000
  2. The client-server: http://localhost:4000
  3. The MockIt API (this is the server that runs your API): http://localhost:3000

If you want to view the dashboard to get started go to http://localhost:5000.

If you want to interact with your new API go to http://localhost:3000.

For example, if you have a /user route setup, go to http://localhost:3000/user to view the data.

Tools

Documentation

Testing

Contributing

If you have any questions, features or issues please raise any issue or pull requests you like.

Donating

If you find this tool useful, feel free to buy me a ☕ ?

Buy a drink

License

MIT.

Contributors

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

主要指標

概覽
名稱與所有者boyney123/mockit
主編程語言JavaScript
編程語言Dockerfile (語言數: 5)
平台
許可證MIT License
所有者活动
創建於2019-01-16 17:42:16
推送於2023-04-18 07:05:20
最后一次提交2020-11-24 08:13:35
發布數5
最新版本名稱1.2.1 (發布於 )
第一版名稱1.0 (發布於 )
用户参与
星數1.6k
關注者數14
派生數83
提交數115
已啟用問題?
問題數35
打開的問題數15
拉請求數31
打開的拉請求數48
關閉的拉請求數25
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?