Skip to content

webaifei/generator-mock-server

Repository files navigation

generator-mock-server

Installation

First, install Yeoman and generator-mock-server using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-mock-server

Then generate your new project: 创建一个mock api服务器

yo mock-server

创建一个新的接口

yo mock-server:api apiFileName
//input the requested path for this api
输入接口请求路径

input the method for requestting this api
输入接收的请求方法
post get put all ...


查看所有的接口

npm run start

接口返回的数据 自行修改对应的路由文件即可

Getting To Know Yeoman

  • Yeoman has a heart of gold.
  • Yeoman is a person with feelings and opinions, but is very easy to work with.
  • Yeoman can be too opinionated at times but is easily convinced not to be.
  • Feel free to learn more about Yeoman.

License

MIT © zhangaifei

About

use nodejs create api and mock data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published