- Watch the video
A nodejs tool that elegantly solves various interface problems in the front-end development process.
mockm is implemented by pure node/js, which means:
- Very friendly to the front end;
- All ecological tools of nodejs can be used;
- Don't worry about browser compatibility, h5/small programs/app can be used;
It is actually a back-end interface service, and the simulation is more comprehensive, for example:
- Can see the network request in the browser console;
- Able to simulate various interface functions of websocket/file upload/download;
- Log recording, data replay;
Simplicity is the goal of this tool, for example:
- You don't even need to install it, just run the command
npx mockmto use it;
- The modification takes effect immediately;
- Comes with internal network penetration;
# Check the node version, currently mockm supports node v10.12.0 and above node -v # Install npm i -g mockm # Run it with the sample configuration mockm --config # Browser open http://127.0.0.1:9005/#/apiStudio/
The above command will generate common configuration, modify
mm.config.js and try it out.
You can also create an API through the UI interface.
|mockjs||The front end intercepts xhr requests and generates data||Can't see the request in the web console|
|json-server||Use json to generate Restful api||No integrated data generation function|
|yapi/rap2||Manage interface documents, generate interfaces and data||Trouble installation, inconvenient to synchronize with front-end projects|
You can check the documentation first, if you still can't solve it, please click Issues and describe the steps and expectations of the problem in detail.
If you think this may be a mockm problem, it is recommended to attach the relevant error log in
httpData/log.err.txt to the description.
The core functions of mockm are built by these tools, thanks to the hard work of every open source author.
There are still many shortcomings in mockm. If you want, you are welcome to contribute.
Copyright (c) 2017-present, xw
|taroify||Taroify is the Taro version of the mobile component library Vant. Both are based on the same visual specification and provide a consistent API interface to help developers quickly build small program applications.|