• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Summerlve/koablog: a blog program using Koa.js and ES6

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

Summerlve/koablog

开源软件地址:

https://github.com/Summerlve/koablog

开源编程语言:

JavaScript 33.0%

开源软件介绍:

Demo

Click this link Demo.


Using

Using:

  • Frontend: Bootstrap, jQuery.js, Vue.js, CKEditor.
  • Backend: Node.js: Koa, Sequelize, EJS.
  • Database&Cache: MySQL, Redis.
  • API Design: RESTful API Design.

INSTALL

This web app dependent on Node.js, MySQL, Redis.

1. Install the MySQL 5.6.19+
2. Install the Redis 2.8.4+
3. Install the Node.js 4.2.1+

API Design

/authentications

/users

/articles

/tags

/groups

/files

/roots

/panels

/abouts


Error Code

authorization and permission
error code description
1000 there is no token in both the http request header field 'Authorization' and query string 'Authorization'
1001 wrong token (can not decode the token)
1002 token out of date
1003 token do not exists, please log in again (token can not find in redis)
1004 username or password is not correct (when log in)
1005 insufficient permission (when someone want to pass the permission filter, but failed)

router /users
error code description
2000 username, password, penName, groupName is required and must be not void (when create new user, but some info dont included in request body)
2001 username exists (want to update username or create new user, but the username is exist, so failed)
2002 penName exists (want to update penName or create new user, but the penName is exist, so failed)
2003 group don't exists
2004 add user failed (In most cases, this is a server error)
2005 update user failed (In most cases, this is a server error)
2006 this item cannot be empty can't be void (when update user's username, penName, password)
2007 change user's group failed (In most cases, this is a server error)
2008 delete user failed (In most cases, this is a server error)

router /articles
error code description
3000 title, tag, content is required, and must be not void (when create new article, but some info dont included in request body)
3001 add article fialed (In most cases, this is a server error)
3002 this item cannot be empty can't be void (when update article's title, tag)
3003 update article failed (In most cases, this is a server error)
3004 delete article failed (In most cases, this is a server error)

router /tags
error code description
4000 add tag fialed (In most cases, this is a server error)
4001 tag's name can not be void (when update a tag's info or create a new tag but the tag's name to void will trigger this error)
4002 update tag failed (In most cases, this is a server error)
4003 delete tag failed (In most cases, this is a server error)
4004 this tag name already exists (when update or create)

router /groups
error code description
5000 groupName can not be void (when create or update)
5001 this group name already exists (when update or create)
5002 create group failed (In most cases, this is a server error)
5003 update group failed(In most cases, this is a server error)
5004 delete group failed (In most cases, this is a server error)




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap