1.2.4 • Published 6 years ago
mockjs-server-cli v1.2.4
mockjs-server-cli
An express server that relies on mockjs to simulate the CLI of interface data
Install
npm install mockjs-server-cliUsage
mode1
You can add mock.config.js to the project root directory
project-root
+ |- mock.config.jsRunning commands
mockjs-servermode2
You can also place mock.config.js somewhere else, or change it to another name.
project-root
+ |- /config
+ |- mock.config.jsRunning commands
mockjs-server --port=8888 --config=config/mock.config.jsoptions
-p, --port(default:8888) - server port--config(default:${cwd}/mock.config.js) - path to the mock config file--delay- simulate http delay