安装json-server做前端测试数据
1.安装json-server
npm install -g json-server
2. 启动json-server
json-server --watch db.json
3.访问验证http://localhost:3000/posts/1
获得
{
"id": 1,
"title": "json-server",
"author": "typicode"
}
All growth is a leap in the dark

浙公网安备 33010602011771号