forked from zedoax/Hubris
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
21 lines (17 loc) · 628 Bytes
/
app.py
File metadata and controls
21 lines (17 loc) · 628 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import logging
import config
from flask import Flask
from api import api_blueprint
from squeue import squeue_blueprint
from tournament import tournament_blueprint
from database import db_init
logger = logging.getLogger(__name__)
app = Flask(__name__, static_url_path='/static')
app.secret_key = config.SECRET_KEY
app.config.from_pyfile('config.py')
app.register_blueprint(api_blueprint, url_prefix='/api/v1')
app.register_blueprint(squeue_blueprint)
app.register_blueprint(tournament_blueprint, url_prefix='/tournament')
db_init.database_check_init()
if __name__ == '__main__':
app.run(host=config.IP, port=config.PORT)