Giter Club home page Giter Club logo

koablog's Introduction

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)

koablog's People

Contributors

summerlve avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.