2016-04-18 08:13:27 +02:00
|
|
|
import os
|
2016-07-03 19:29:30 +02:00
|
|
|
from app import app
|
2016-04-28 06:32:51 +02:00
|
|
|
import logging
|
2017-11-07 22:31:31 +01:00
|
|
|
from config import config
|
2016-04-28 06:32:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
def setup_logging():
|
|
|
|
logging.basicConfig(format='%(asctime)s [%(levelname)s]: %(message)s', level=logging.INFO)
|
2015-03-06 21:58:53 +01:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2017-11-07 22:31:31 +01:00
|
|
|
c = config[os.getenv('FLASK_CONFIG') or 'default']
|
|
|
|
|
|
|
|
DEBUG = c.DEBUG
|
|
|
|
DEBUG = os.environ.get('DEBUG', DEBUG)
|
|
|
|
|
2016-04-28 06:32:51 +02:00
|
|
|
setup_logging()
|
2016-04-18 08:13:27 +02:00
|
|
|
app.run(debug=DEBUG, host='0.0.0.0')
|