Pritam Banik
Pritam Banik

Reputation: 121

what's the difference between using FLASK_ENV=development and app.run(debug=True)?

I have always been puzzled about this. I usually use both while working with a flask application which sometimes I feel is redundant. Can someone please clarify?

Upvotes: 2

Views: 405

Answers (1)

soumith
soumith

Reputation: 616

When you set the debug flag, it's internal to the flask app. When you set an environmental variable, other extensions and related modules can use it too. For me, one such use case was when I used sentry.

Upvotes: 3

Related Questions