Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 1012 Bytes

README.md

File metadata and controls

33 lines (26 loc) · 1012 Bytes

realworld-backend-Koa.js

Description

An implementation of realworld backend by Koa2(realworld api doc).

API Feature

  1. Authentication(JWT)(登录)
  2. Registration(注册)
  3. Get Current User(获取当前用户)
  4. Update User(修改当前用户信息)
  5. Get Profile(获取指定用户的基础信息)
  6. Follow/Unfollow user(关注、取消关注)
  7. List Articles(获取所有文章)
  8. Feed Articles(获取已关注用户的文章)
  9. C/R/U/D Article(文章增删改查)
  10. Add/Get Comments to an Article(添加、获取某篇文章的评论)
  11. Delete Comment(删除某个评论)
  12. Favorite/Unfavorite Article(收藏、取消收藏文章)
  13. Get Tags(获取所有文章标签)

Development

$ cd src
$ npm i
$ npm run dev

Middleware

  • 路由系统:koa-router
  • body解析:koa-bodyparser: