16 lines
376 B
Python
16 lines
376 B
Python
from flask import Flask
|
|
from config import get_config
|
|
from .errors import register_error_handlers
|
|
|
|
def create_app():
|
|
app = Flask(__name__)
|
|
config = get_config()
|
|
app.config.from_object(config)
|
|
config.init_app(app)
|
|
|
|
from . import routes
|
|
app.register_blueprint(routes.bp)
|
|
|
|
register_error_handlers(app) # Make sure this line is present
|
|
|
|
return app |