-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.py
35 lines (32 loc) · 957 Bytes
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import logging
import logging.config
from flask_rest_experiment.app import create_app
if __name__ == '__main__':
logging.config.dictConfig({
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'standard': {
'format': '%(name)s : %(message)s'
},
},
'handlers': {
'default': {
'level': 'DEBUG',
'formatter': 'standard',
'class': 'logging.StreamHandler',
'stream': 'ext://sys.stdout',
},
},
'loggers': {
'flask_rest_experiment': {
'handlers': ['default'],
'level': 'DEBUG',
'propagate': False,
},
}
})
logger = logging.getLogger('flask_rest_experiment')
logger.info('starting application')
app = create_app()
app.run(host='0.0.0.0', port=8000, debug=True)