It's a lightweight mock server plugin based on express. No more than 5 minutes of skilled use. It's useful when you develop frontend applications with VS Code github.
Features
Start AMock Server
Reload AMock Server
Stop AMock Server
Config AMock Unit
Config AMock Server
Usage
Config AMock Server: When you open workspace ,this plugin while create a default .amock floder and ./amock/setting.json in your workspace. Setting.json is the server config, you can modify it to adapt your requirements.
Config AMock Unit: You can add amock unit config in ./amock floder. Amock unit config file name must like *.amock.js.
Run AMock Server: To start AMock Server. In Explorer of VS Code,click "AMock" in the bottom left corner, then click the start button to run amock server.When start success, you can use it in your frontend project or test it with browser or postman.
Reload Amock Server: When you modify and save settings.json or *.amock.js files. in Explorer of VS Code in the bottom left corner , then click the reload button to reload config
Setting
settgin.json:
{
name:"servername",
port:3000 // default port 3000
}
it must be set when you use commHandler,this value will be prop container amock unit response
true
you can set anything you common repsone should have
false
Issues
Currently, the extension is in the very initial phase. If you find any bug or have any suggestion/feature request, please submit the issues to the GitHub Repo. Or you can send email to 1104238614@qq.com.