flask-script

Run code after flask application has started

Run code after flask application has started Question: My goal is to get arbitrary code to run after my Flask application is started. Here is what I’ve got: def run(): from webapp import app app.run(debug=True, use_reloader=False) Ideally I would be able to just do this: def run(): from webapp import app app.run(debug=True, use_reloader=False) some_code() But …

Total answers: 7