(Project not complete)
-
dependencies
- main: express
- log: log4js
- database frame: mongoose
- unique id: node-uuid
-
database
- mongodb
Response json data like this
res.send({
status:1,
content:"success",
data:result[0]
})
- 0 ——————> There is no such data in database.
- 1 ——————> Success.
- 2 ——————> A field is required but missing in request.
- 3 ——————> User no auth , request forbidden.
- 4 ——————> Backup status , not used for now.
- /getBlogList ——————> Get blog list data , content will show no more than 30 words.
- /getBlogDetail ——————> Get blog detail content.
- /deleteBlog ——————> Delete blog , need author.
- /reportBlog ——————> Report blog.
- /getCommentList ——————> Get comment list .
- /reportComment ——————> Report comment.
- /deleteComment ——————> Delete this comment , need author or blog author.