在github上新建repo,其他配置默认即可
点击蓝色的字 create a new file
新建文件db.json,输入以下内容
{
"posts": [
{
"id": 1,
"title": "hello"
}
],
"profile": {
"name": "typicode"
}
}
点击preview,点击 commit new file
访问链接为
https://my-json-server.typicode.com/你的github用户名/testapi/db
参考链接: