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

restful-mock-server

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restful-mock-server

A mock server returning random JSON from schema.

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

restful-mock-server

A mock server returning random JSON from schema.

MIT License

npm: downloads:? dependencies:?

Install

First make sure you have installed the latest version of node.js (You may need to restart your computer after this step).

From NPM for use as a command line app:

$ npm install restful-mock-server -g

From NPM for programmatic use:

$ npm install restful-mock-server

Usage

$ mock [options] [--rules path-to-rules.js]

The available options are:

  -r, --rules file .......... Specified an rule file. `mock --help rules` for more information.
  -p, --port port ........... Specify the port for proxy server. Default: 9528.
  -h, --host host ........... Specify the hostname for proxy server. Default: '127.0.0.1'.
  -w, --watch ............... When true the rules will auto update when the rule files changed.
  -d, --debug ............... Show debugging information whilst running. Default: true.
  -v, --verbose ............. Show verbose logging whilst running. Default: false.
  -s, --silent .............. Disable any logs. Default: false.
  --sensitive ............... When true the route will be case sensitive. Default: false.
  --strict .................. When false the trailing slash is optional. Default: false.
  --end ..................... When false the path will match at the beginning. Default: true.
  -V, --version ............. Print the current version.
  -h, --help ................ You're looking at it.
  -h, --help command ........ Show details for the specified command.
  --no-color ................ Disable colors in the console.

API Reference

Assuming installation via NPM, you can load this module in your application like this:

var mockServer = require("restful-mock-server");
mockServer(options);
  • json-from-template Generate random JSON(plain old object) from the given template.
  • generate-random-data Javascript utilities for generating random data.

Keywords

mock

FAQs

Package last updated on 01 Mar 2016

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