restful-mock-server

0.0.2 • Public • Published

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);

Related

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    3
  • 0.0.1
    1

Package Sidebar

Install

npm i restful-mock-server

Weekly Downloads

4

Version

0.0.2

License

MIT

Last publish

Collaborators

  • bubkoo