0.1.3 • Published 7 years ago

papatch v0.1.3

Weekly downloads
2
License
ISC
Repository
-
Last release
7 years ago

papatch

Mock API responses for frontend prototyping.

How to use

You need to install it from npm:

$ npm i -g papatch # would install it globally
$ papatch --help

Currently only CLI driver is available. The workflow looks like this:

asciicast

Magic URLs

papatch provides few magic URLs:

  • /magic-papatch-shutdown -- cleanly shutdown the server
  • /magic-papatch-clear -- clear responses (start fresh, basically)
  • /magic-papatch-dump -- show all possible responses (useful for debugging)
  • /magic-papatch-save -- save current definitions to dump.json in the current directory

I don't want to enter every route definition from scratch every time!

Me too! Save it to the file (see Magic URLs) and supply the path to the file as an argument on subsequent loads, like this:

$ papatch -p 5043 my-definitions.json

What's next?

Web and GUI drivers (ways to enter new mock responses to the server).

License

ISC license. Tim Marinin mt@marinin.xyz, 2017.