更多信息请看
package.json
- Node ≥ 4
- NPM ≥ 3
$ 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
见上
# 一个信息:
{
"id":"4d48e8d0",
"time":1465291755485,
"author":"ken",
"title":"hello world",
"content":"welcome to msg-board-api"
}
# 用户 session:
{
"username": "ken"
}
请确认 mocha 全局安装
若无,npm i mocha -g
$ npm test
...