mirror of
https://github.com/jimeh/pylight.git
synced 2026-02-19 01:46:42 +00:00
use debug mode if FLASK_ENV is not 'production'
This commit is contained in:
5
app.py
5
app.py
@@ -45,5 +45,6 @@ def api_highlight():
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
port = int(os.environ.get("PORT", 5000))
|
||||
app.run(host='0.0.0.0', port=port)
|
||||
port = int(os.environ.get('PORT', 5000))
|
||||
use_debug = os.environ.get('FLASK_ENV', 'development') != 'production'
|
||||
app.run(host='0.0.0.0', port=port, debug=use_debug)
|
||||
|
||||
Reference in New Issue
Block a user