You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

stubs-server

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stubs-server

Module to mock API via json stubs

3.8.0
latest
Source
npmnpm
Version published
Weekly downloads
153
-23.5%
Maintainers
1
Weekly downloads
 
Created
Source

Stubs Server

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

Setup

  • 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.

UI Screenshot

stubs-server

image

image

Keywords

JSON

FAQs

Package last updated on 22 May 2019

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