Skip to content
Mock an API and generate fake JSON test data, right from the terminal.
JavaScript
Branch: master
Clone or download
Latest commit cb2e443 Jan 16, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.github
.gitignore
cli.js Migrate to Meeshkan org Jan 16, 2020
package-lock.json 1.1.0 Jan 16, 2020
package.json Add keywords Jan 16, 2020
readme.md
test.js Fix --server flag tests Dec 27, 2019

readme.md

jaymock-cli

CircleCI XO Codecov

Mock an API and generate fake JSON test data, right from the terminal.

Install

~ ❯❯❯ npm install --global @meeshkanml/jaymock-cli

Usage

  Usage
    $ jaymock <text> [--json]
    $ cat <file> | jaymock [--json]
    $ jaymock --server [--port <number>]
   
  Options
    --json, -j    Print output in JSON format
    --server, -s  Start a development server for API mocking
    --port, -p    Specify a port number for the server
   
  Examples
    $ jaymock '{"firstName":"name.firstName", "lastName":"name.lastName"}'
    {
      "firstName": "Alvina",
      "lastName": "Hodkiewicz"
    }
    $ jaymock '{"firstName":"name.firstName", "lastName":"name.lastName"}' --json
    {"firstName":"Anthony","lastName":"Krajcik"}
    $ jaymock --server --port 1337

Related

Contributing

Thanks for wanting to contribute! We will soon have a contributing page detailing how to contribute. Meanwhile, feel free to star this repository, open issues, and ask for more features and support.

Please note that this project is governed by the Meeshkan Community Code of Conduct. By participating in this project, you agree to abide by its terms.

License

MIT © Meeshkan

You can’t perform that action at this time.