server-mockup-api
v0.0.9-alpha-1
Published
To get full fake REST API with no efforts. Add/Modify API endpoint and response through JSON file.
Downloads
16
Maintainers
Readme
server-mockup-api
To get full fake REST API with no efforts. Add/Modify API endpoint and response through JSON file.
Installation
npm i server-mockup-api
OR
yarn add server-mockup-api
Run server-mockup-api
server-mockup-api --port=8081 --db=./mock-json/db --routes=./mock-json/routes --delayInResponse=0 --middlewares='./../../middlewares/sample-middleware1,./../../middlewares/sample-middleware2'
OR To enable https
server-mockup-api --port=8081 --db=./mock-json/db --routes=./mock-json/routes --delayInResponse=0 --enableHttps=true --cert=./RootCA.cert --key=./RootCA.key --middlewares='./../../middlewares/sample-middleware1,./../../middlewares/sample-middleware2'
Where
- port: Application running port number.
- db: Directory path where all response json file saved.
- routes: Directory path where all api endpoit routes json file saved.
- middlewares: Middleware extension ability
It is extension on top of JSON-SERVER
Version History
- = 0.0.6 Support http
= 0.0.7 Adeed https feature
= 0.0.9-alpha-0 Added suppport for middleware chaining
=0.0.9-alpha-1 enabled cors