-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
18 lines (17 loc) · 1.05 KB
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#-*-coding:utf8-*-
from init import create_app
from views import get_sorted_Userlist, index, login, logout, register, update_target, update_UserLevel, vimlevel, rank, get_practice_record, get_record
app = create_app()
app.add_url_rule('/', 'index', index)
app.add_url_rule('/login', 'login', login, methods=['GET', 'POST'])
app.add_url_rule('/logout', 'logout', logout)
app.add_url_rule('/register', 'register', register, methods=['GET', 'POST'])
app.add_url_rule('/update_target', 'update_target', update_target, methods=['POST'])
app.add_url_rule('/update_UserLevel', 'update_UserLevel', update_UserLevel, methods=['POST'])
app.add_url_rule('/vimlevel', 'vimlevel', vimlevel)
app.add_url_rule('/rank', 'rank', rank)
app.add_url_rule('/get_record', 'get_record', get_record)
app.add_url_rule('/get_sorted_Userlist', '/get_sorted_Userlist', get_sorted_Userlist, methods=['POST'])
app.add_url_rule('/get_practice_record', '/get_practice_record', get_practice_record, methods=['POST'])
app.run(host='0.0.0.0', port=5000, debug=True)
# 用gunicorn运行的时候不要写这一行