npm installnpm install snapstub -g(snazzy package that makes this all possible)
- Drop an up-to-date
*.postman_collection.jsonand*.postman_environment.jsonfile into./postman_apis - Rename
config.json.exampletoconfig.jsonand update with your filenames:
{
"collectionFile": "./postman_apis/YOUR_COLLECTION.postman_collection.json",
"environmentFile": "./postman_apis/YOUR_ENVIRONMENT.postman_environment.json"
}
- Run
npm startand watch your API requests get downloaded into the__mocks___folder (thanks, Snapstub!).
snapstub startto run your freshly updated offline API.
Point a client at http://127.0.0.1:8059 instead of your normal REST API url and start making offline requests!