Last active
January 22, 2020 15:31
-
-
Save Porter97/96bbe78cc9dd83bbb44b1935bfb3c07a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from .extensions import bootstrap, db, moment | |
from config import config | |
def create_app(config_name): | |
app = Flask(__name__) | |
app.config.from_object(config[config_name]) | |
config[config_name].init_app(app) | |
bootstrap.init_app(app) | |
db.init_app(app) | |
moment.init_app(app) | |
from .main import main as main_blueprint | |
app.register_blueprint(main_blueprint) | |
return app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment