add switch for debugger
This commit is contained in:
@@ -9,13 +9,13 @@ import uuid
|
||||
import hashlib
|
||||
import time
|
||||
from functools import wraps
|
||||
import os
|
||||
|
||||
app = Flask(__name__)
|
||||
DATABASE = '/data/rollerverbrauch.db'
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///'+DATABASE
|
||||
sqldb = SQLAlchemy(app)
|
||||
|
||||
DEBUG = True
|
||||
SECRET_KEY = 'development key'
|
||||
app.config.from_object(__name__)
|
||||
|
||||
@@ -236,4 +236,5 @@ def prepare_pit_stops(pss):
|
||||
return pitstops
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True, host='0.0.0.0')
|
||||
DEBUG = 'DEBUG' in os.environ and os.environ['DEBUG'] != 'False'
|
||||
app.run(debug=DEBUG, host='0.0.0.0')
|
||||
|
||||
Reference in New Issue
Block a user