flaschengeist/geruecht/__init__.py

31 lines
839 B
Python
Raw Normal View History

2019-04-17 12:46:46 +00:00
""" Server-package
Initialize app, cors, database and bcrypt (for passwordhashing) and added it to the application.
Initialize also a singelton for the AccesTokenControler and start the Thread.
"""
from .logger import getLogger
LOGGER = getLogger(__name__)
LOGGER.info("Initialize App")
2019-04-17 12:46:46 +00:00
2019-04-11 21:56:55 +00:00
from flask import Flask
from flask_cors import CORS
2019-01-13 19:07:46 +00:00
LOGGER.info("Build APP")
2019-01-13 19:07:46 +00:00
app = Flask(__name__)
CORS(app)
app.config['SECRET_KEY'] = '0a657b97ef546da90b2db91862ad4e29'
2019-04-11 21:56:55 +00:00
from geruecht import routes
2019-12-22 21:27:39 +00:00
from geruecht.baruser.routes import baruser
from geruecht.finanzer.routes import finanzer
2020-01-17 00:05:58 +00:00
from geruecht.user.routes import user
2020-01-18 22:31:49 +00:00
from geruecht.vorstand.routes import vorstand
LOGGER.info("Registrate bluebrints")
2019-12-22 21:27:39 +00:00
app.register_blueprint(baruser)
app.register_blueprint(finanzer)
2020-01-17 00:05:58 +00:00
app.register_blueprint(user)
2020-01-18 22:31:49 +00:00
app.register_blueprint(vorstand)