An implementation of realworld backend by Koa2(realworld api doc).
- Authentication(JWT)(登录)
- Registration(注册)
- Get Current User(获取当前用户)
- Update User(修改当前用户信息)
- Get Profile(获取指定用户的基础信息)
- Follow/Unfollow user(关注、取消关注)
- List Articles(获取所有文章)
- Feed Articles(获取已关注用户的文章)
- C/R/U/D Article(文章增删改查)
- Add/Get Comments to an Article(添加、获取某篇文章的评论)
- Delete Comment(删除某个评论)
- Favorite/Unfavorite Article(收藏、取消收藏文章)
- Get Tags(获取所有文章标签)
$ cd src
$ npm i
$ npm run dev
- 路由系统:koa-router
- body解析:koa-bodyparser: