Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

lborgav/mockingbird

Repository files navigation

Mockingbird - Simple HTTP mock server

WORK IN PROGRESS

Build Status

Install

For now, clone this repo and install the required modules with yarn or npm, and link:

$ yarn install
$ yarn link

Now you have the mockingbird cli

Usage

Prepare a json file with the following format:

//mock.json
{
 "8080": {
 "GET /numbers": [1, 2, 3, 4, 5]
 },
 "8081": {
 "POST /login": {
 "token": "fkj34rDjhf",
 "logged": true
 }
 }
}

It is a dictionary with the port you want to follow where the values are dictionaries with the method and the path you want to mock with the respective response. Now execute the following command on terminal:

$ mockingbird mock.json

If we do a GET on localhost:8080/numbers, we have [1, 2, 3, 4, 5] as response

Testing

$ yarn test

License

MIT

About

Simple HTTP mock server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

AltStyle によって変換されたページ (->オリジナル) /