Skip to content

ankur-kushwaha/stubs-server

Repository files navigation

Stubs Server

UI interface for creating and mocking API responses via json stubs.

Setup

  1. Create a folder 'stubs' which will contains all the json stubs files
  2. Just run npx stubs-server and your stubs will hosted on port 9001.
  3. Open https://localhost:9001,
  4. This will open the stubs-ui console where you can create or edit your stubs.
  5. Create new stubs by clicking 'Create New Stub'.
  6. Type the 'api name'(e.g "test") and enter valid json and Click 'Add API'.
  7. Search for API, edit and save.
  8. Test your mock api by going to browser "http://localhost:9001/test".
  9. Your other routes will work as normal.

HTTPS

This will also spawn an HTTPS server on port 9001(https://localhost:9001). The public file for https certificate is available at ./certificates/publickey.pub. Download public key

UI Screenshot

stubs-server

image

image

About

Mock API via json stubs through an UI interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published