49

A simple way to manage and start your api mock server on your local platform

 5 years ago
source link: https://www.tuicool.com/articles/hit/fqQVBnv
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

QjA3yuE.png!web

Mockman is a powerful and convenient tool that helps you to manage and start mock servers locally.

With the app, you can easily configure the routes, request format and response of a mock server

Screenshot

iQBnui7.png!web

Usage

UZnqquY.jpg!web

  1. Create your mock server - click the add button
  2. Configure the name , port and prefix of your move server, make sure the port is not in use, or Mockman will give you a error notification.
  3. Add some apis for your mock server.
  4. Configure the method , route , response code , latency , required request options and reponse data of each api.
  5. Start the server - click the start button .
  6. After all, you can test your api locally.

Where will your api data be stored?

Your data will be stored as a sqlite file absolutely on your local, the path will be different on different operation system.

%APPDATA%
$XDG_CONFIG_HOME or ~/.config
~/Library/Application Support

Todos

Server

  • ipcMain && ipcRender communication
  • dababase support
  • create a new mock
  • update a mock
  • remove a mock
  • query a mock info
  • create an api
  • update an api
  • remove an api
  • query an api info
  • start an express server with a mock config
  • handle errors while starting the server

Client

  • brand header dislay
  • mock sider display
  • mock-detail and api-list display
  • api-detail display
  • create a new mock
  • update a mock
  • remove a mock
  • query a mock info
  • create an api
  • update an api
  • remove an api
  • query an api info
  • request params check list
  • response k-v input group
  • response code editor
  • add blur event to jsonEditor
  • group the apis with tag
  • check the conflict of all mocks
  • add a log panel to show the logs of an active mock server process
  • add https support

License

Contribute

# install native dependencies through `native.sh`
./native.sh

# serve with hot reload at localhost:9080
npm run dev 

# build mockman
npm run build

# run unit tests
npm test 

# lint all JS/Vue component files in `src/`
npm run lint

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK