【文件属性】:
文件名称:restify-demo:使用MongoDB,NodeJS和Restify博客RESTful API
文件大小:7KB
文件格式:ZIP
更新时间:2021-05-05 10:00:41
JavaScript
宁静的演示
使用MongoDB,NodeJS和Restify对RESTful API进行博客撰写。
先决条件
MongodDB已安装并正在运行。
将您的mongo网址设置为var环境: process.env.MONGO_URL
安装
$ npm install
跑步
$ node server
原料药
文章
POST /articles with Payload创建文章-> POST /articles with Payload
更新文章-> PUT /articles/123 with Payload
删除文章-> DELETE /articles/123
查看文章-> GET /article/123
评论
创建评论-> POST /articles/123/comments
PUT /comments/123 with Payload更新注释-> PUT /comme
【文件预览】:
restify-demo-master
----server.js(60B)
----README.md(834B)
----.gitignore(251B)
----app()
--------models()
--------controllers()
--------core()
----package.json(364B)