A Simple Message Board / 简易留言板
Features中文介绍点击 这里
Express 4.x Express Auto Routes Lodash UUID Requirements Node ≥ 4 NPM ≥ 3 Getting StartMore Detail in
package.json
$ git clone https://github.com/kenberkeley/msg-board-api.git
$ cd msg-board-api
$ npm install
$ npm start
> msg-board-api@0.1.0 start /Users/kenberkeley/Documents/Desktop/msg-board-api
> node bin/start.js
[AutoMount] delete /msg/:msgId
[AutoMount] put /msg/:msgId
[AutoMount] get /msg/:msgId
[AutoMount] get /logout
[AutoMount] post /login
[AutoMount] get /user/
[AutoMount] post /msg/
[AutoMount] get /msg/
[INFO] Msg board RESTful API listening at localhost:8989
APIs
JSON FormatShowed as above
# A message example:
{
"id":"4d48e8d0",
"time":1465291755485,
"author":"ken",
"title":"hello world",
"content":"welcome to msg-board-api"
}
# A session example:
{
"username": "ken"
}
Testing
Make sure mocha available globally.
If not,npm i mocha -g
$ npm test
...
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。