start
honcho start -f local (use gunicorn)
Frest is the frame of the restful api server created with pallets/flask.
Basic restful api server including login, sign up, sign out, modify account, writing, and etc..
Just modify app/config
and python app.py runserver
use it.
API
GET /api/v@/
Return environment, versionsPOST /api/v@/auth
LoginPOST /api/v@/logout
Sign outGET /api/v@/users
Get users with token and params: page(Default: 0), limit(Default: 10)POST /api/v@/users
Sign UpGET /api/v@/users/<prefix(me or user_id)>
Return user informationPUT /api/v@/users/<prefix(me or user_id)>
Modify user informationDELETE /api/v@/users/<prefix(me or user_id)>
Delete userGET /api/v@/token?type=extension&token=<token>
Token expire time extensionGET /api/v@/users/<prefix(me or user_id)>/login_histories
Return Login histories with token and params: page(Default: 0), limit(Default: 10)
FUNCTION
- Auto route loading
app/routes
- Decorating return values
app/modules/frest/api
- You can expire token with function
app/models/user_token_model
token_expire_all, token_expire_with_token
How to see apidoc
//install
npm install apidoc -g
//run
apidoc -i ./ -o ./apidoc
//in directory ./apidoc, apidoc will be generated