Esempio n. 1
0
def create_app(config_name, base_path=None):
    """Create flask app and return it"""
    load(base_path)
    app = Flask(__name__, static_folder="../ui/build/static",
                template_folder="../ui/build")

    configure_app(app, config_name)
    configure_blueprints(app, BLUEPRINTS)
    configure_logging(app)

    @app.errorhandler(404)
    def lost_index(e):
        print("Handled 404")
        return render_template("index.html")

    return app
Esempio n. 2
0
 def create(config, path):
     load(path)
     return app