Skip to content

Commit aea1e09

Browse files
committed
fix: 🐛 add main route
1 parent 39cc318 commit aea1e09

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

run.py

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
'''
2+
Created on Apr 30, 2018
3+
4+
@author: QiZhao
5+
'''
6+
7+
from flask import Flask,request
8+
from app.v1.urp import urp_bp
9+
from app.v1.room import room_bp
10+
from app.v1.lib import lib_bp
11+
from app.v1.campus import campus_bp
12+
13+
app = Flask(__name__)
14+
app.secret_key = 'please-generate-a-random-secret_key'
15+
app.config['JSON_AS_ASCII'] = False
16+
app.register_blueprint(urp_bp, url_prefix='/api/v1')
17+
app.register_blueprint(room_bp,url_prefix='/api/v1')
18+
app.register_blueprint(lib_bp,url_prefix='/api/v1')
19+
app.register_blueprint(campus_bp,url_prefix='/api/v1')
20+
21+
22+
if __name__ == '__main__':
23+
app.run(host='localhost',port='5001',debug=True)

0 commit comments

Comments
 (0)