1、JSON Server 快速搭建一个http服务
扮演一个服务端角色,与axios结合做实践 github.com/typicode/json-server
(1)npm install -g json-server
(2)创建一个db.json文件(官网)
(3)开启JSON Server
json-server --watch db.json
2、配置axios
基于Promise的http客户端 github.com/axios/axios
1、JSON Server 快速搭建一个http服务
扮演一个服务端角色,与axios结合做实践 github.com/typicode/json-server
(1)npm install -g json-server
(2)创建一个db.json文件(官网)
(3)开启JSON Server
json-server --watch db.json
2、配置axios
基于Promise的http客户端 github.com/axios/axios