UI interface for creating and mocking API responses via json stubs.
- Create a folder 'stubs' which will contains all the json stubs files
- Just run
npx stubs-server
and your stubs will hosted on port 9001. - Open
https://localhost:9001
, - This will open the stubs-ui console where you can create or edit your stubs.
- Create new stubs by clicking 'Create New Stub'.
- Type the 'api name'(e.g "test") and enter valid json and Click 'Add API'.
- Search for API, edit and save.
- Test your mock api by going to browser "http://localhost:9001/test".
- Your other routes will work as normal.
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