https://github.com/xav-b/mockingbird
Realistic and Pareto-ish API mocker
https://github.com/xav-b/mockingbird
api cli mock nodejs tool
Last synced: about 2 months ago
JSON representation
Realistic and Pareto-ish API mocker
- Host: GitHub
- URL: https://github.com/xav-b/mockingbird
- Owner: xav-b
- License: mit
- Created: 2019-07-27T06:14:41.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T05:29:30.000Z (over 3 years ago)
- Last Synced: 2025-12-31T10:15:31.740Z (6 months ago)
- Topics: api, cli, mock, nodejs, tool
- Language: JavaScript
- Size: 1.09 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
---
[](https://travis-ci.org/xav-b/mockingbird)
[](https://codecov.io/gh/xav-b/mockingbird)
## ✨ Highlight
✔️ Declarative API description
✔️ Endpoints as code to fit all use cases
✔️ Generate data - on the fly or beforehand for more control
✔️ Easily switch scenarios to simulate different use cases
✔️ Support swagger to easily share and interact with the API contract
✔️ Emulate complex scenarios:
- request delays
- [todo] authentication
## In a Nutshell
```sh
# all you need is 5min - let's get started
npm install -g @hackliff/mockingbird
mkdir -p nasa/scenarios && cd nasa
```
**Write a scenario**
```
// in ./scenarios/build.js
const success = (req, res) => res.status(204).json({ request_id: Math.random() })
module.exports = { success }
```
**Write some config**
```yaml
title: 'NASA'
storage: 'json'
scenarios:
- name: healthcheck
endpoints:
- description: 'build spaceship'
method: POST
module: ./scenarios/build
uri: /v2/spaceships
scenario: async success
latency: 4000
```
**Serve a full-featured API**: `mockingbird serve --port 4000`
**Profit**: `curl -X POST -d '{ "engine": "nuclear" }' localhost:4000/v2/spaceships`
## Installation
## Usage
### Configuration
### Scenarios
---
## Workflow
### 🚀 Release
We follow a few industry standards.
- Git flow
- Semantic release
- Release notes are only generated for major releases.
### Local issue tracker
_To be progressively migrated to github issues as we release it open
source_
The project manages todos using
[taskbook](https://github.com/klaussinani/taskbook). After installing
dependencies, source `.env` to update its configuration and use the
local database.
Then use it as indicated on the github readme: `npx tb -i`.
---

### 💖 Shameless plug
> Hey nice to meet you, I'm [Xavier](www.xav-b.fr) and I maintain this project.

