0.3.3 • Published 3 years ago

mocki v0.3.3

Weekly downloads
11
License
ISC
Repository
github
Last release
3 years ago

Mocki

npm version Coverage Status

Mocki is a tool that lets you create Mock REST and GraphQL APIs.

Support for

  • Simulated failures
  • Simulated delays
  • Randomized reponses
  • Conditional resposes
  • Fake data generation

Getting Started

  1. Install Mocki npm install -g mocki
  2. Create a config YAML-file using the structure in .mocki/config.yml

    Hello world example:

     name: mocki
     port: 3000
     endpoints:
       - path: /hello
         method: get
           responses:
             - statusCode: 200
               body:
                 message: Hello from Mocki!
  3. Start your mock by running mocki run --path ./path/to/config.yml

  4. Test your mock by running curl http://localhost:3000
    { "message": "Hello World!" }

Prerequisites

We recommend using nvm to manage Node versions

  • npm > 6
  • node > 12

Documentation

Documentation is available at Mocki.io

Publishing a new version

  1. Create tag from latest commit: git tag vX.Y.Z
  2. Push tag: git push origin vX.Y.Z
  3. Publish to npm: npm publish
  4. Update coverage report: npm run coverage
0.3.3

3 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.6

4 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago