1.2.4 • Published 6 years ago

mockjs-server-cli v1.2.4

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

mockjs-server-cli

npm

An express server that relies on mockjs to simulate the CLI of interface data

View examples

Install

npm install mockjs-server-cli

Usage

mode1

You can add mock.config.js to the project root directory

project-root

+ |- mock.config.js

Running commands

mockjs-server

mode2

You can also place mock.config.js somewhere else, or change it to another name.

project-root

+ |- /config
+   |- mock.config.js

Running commands

mockjs-server --port=8888 --config=config/mock.config.js

options

  • -p, --port(default: 8888) - server port
  • --config(default: ${cwd}/mock.config.js) - path to the mock config file
  • --delay - simulate http delay