先安装npm install json-server
db.json创建数据
json-server --watch db.json
{ "brands": [ { "id": 1, "name": "宝马", "ctime": "2020-02-02 10:10:10" }, { "id": 2, "name": "奔驰", "ctime": "2021-02-02 10:10:10" }, { "id": 3, "name": "奥迪", "ctime": "2022-02-02 10:10:10" } ] }