New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

server-mockup-api

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

server-mockup-api

To get full fake REST API with no efforts. Add/Modify API endpoint and response through JSON file.

latest
Source
npmnpm
Version
0.0.9-alpha-1
Version published
Maintainers
1
Created
Source

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

Demo Application

server-mockup-api-demo

Analytics

Keywords

json

FAQs

Package last updated on 17 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts