Skip to content

Turn a Postman collection into a runnable offline API

Notifications You must be signed in to change notification settings

dkordik/api-airplane-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api-airplane-mode

Turn a Postman collection into a runnable offline API

Setup

  • npm install
  • npm install snapstub -g (snazzy package that makes this all possible)

Taking a snapshot

  • Drop an up-to-date *.postman_collection.json and *.postman_environment.json file into ./postman_apis
  • Rename config.json.example to config.json and update with your filenames:
{
    "collectionFile": "./postman_apis/YOUR_COLLECTION.postman_collection.json",
    "environmentFile": "./postman_apis/YOUR_ENVIRONMENT.postman_environment.json"
}
  • Run npm start and watch your API requests get downloaded into the __mocks___ folder (thanks, Snapstub!).

Running the offline API

  • snapstub start to 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!

About

Turn a Postman collection into a runnable offline API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published