naive-mock
A lightweight mock system with web configuration interface.
Usage
# install naive-mock
npm install --global naive-mock
Options
-
port
- Specify port number you wantnaive-mock
run for -
dataDir
- Specify where to put mock data, settings.json. For example:./data
-
logDir
- Specify where to put error log. Useful when you have error usingnaive-mock
, you can send error log to me. No log recorded by default -
help
- Print help menu with the list of arguments -
version
- Print what version it is
Give a try
mock --port 8080
The mock system will be launched at port
8080
. Visit it with: http://127.0.0.1:8080. Data & settings will be stored at${CWD}/data/
.
Want play with source code?
#clone this repo
git clone https://github.com/leftstick/naive-mock.git
#install dependencies
npm install
#start portal at 3000 portal
npm start
Now you can visit portal through: http://localhost:3000