def run(): """The main method, starts the application running""" parser = create_arguments_parser() arguments = parser.parse_args() if arguments.init_db: datastore.init_db(app) else: app.run(debug=arguments.debug, use_reloader=arguments.auto_reload)
from datastore import init_db init_db()
def run(self, host=None, port=None, debug=None, load_dotenv=True, **options): with self.app_context(): init_db(IS_PRODUCTION) super(FlaskApp, self).run(host=host, port=port, debug=debug, load_dotenv=load_dotenv, **options)