Skip to content

ronffy/mockjs-server-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors