红联Linux门户
Linux帮助

JSON Server v0.8.12发布,Bug修复版本

发布时间:2016-05-09 09:20:03来源:红联作者:baihuo
JSON Server v0.8.12 发布了,该版本主要修复了一些已知Bugs,并没有增加什么新特性。

JSON Server 用来创建 RestApi,使用非常的方便。

安装

安装之前,需要已经安装好NodeJs.

$ sudo npm install -g json-server

基本使用

新建一个db.json文件写入一段json,如:

{
"posts": [
{ "id": 1, "title": "json-server", "author": "typicode" }
],
"comments": [
{ "id": 1, "body": "some comment", "postId": 1 }
],
"profile": { "name": "typicode" }
}

启动server

json-server --watch db.json

下载地址:https://github.com/typicode/json-server/archive/v0.8.12.tar.gz

来自:开源中国社区
文章评论

共有 0 条评论