Add .ini configuration management
This commit is contained in:
parent
2e6a6bb53d
commit
41701290ea
2
.gitignore
vendored
2
.gitignore
vendored
@ -25,3 +25,5 @@ static/fonts/*
|
|||||||
|
|
||||||
# local log files
|
# local log files
|
||||||
log/*
|
log/*
|
||||||
|
|
||||||
|
config/dev.ini
|
||||||
|
18
app.py
18
app.py
@ -1,11 +1,15 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
from atst.app import make_app
|
|
||||||
import tornado.ioloop
|
|
||||||
import os
|
import os
|
||||||
|
import tornado.ioloop
|
||||||
|
|
||||||
app = make_app(debug=os.getenv('DEBUG',False))
|
from atst.app import make_app, make_config
|
||||||
port = 8888
|
|
||||||
app.listen(port)
|
config = make_config()
|
||||||
print("Listening on http://localhost:%i" % port)
|
app = make_app(config)
|
||||||
tornado.ioloop.IOLoop.current().start()
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
port = int(config['default']['PORT'])
|
||||||
|
app.listen(port)
|
||||||
|
print("Listening on http://localhost:%i" % port)
|
||||||
|
tornado.ioloop.IOLoop.current().start()
|
||||||
|
3
config/base.ini
Normal file
3
config/base.ini
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[default]
|
||||||
|
ENVIRONMENT = dev
|
||||||
|
DEBUG = true
|
0
config/ci.ini
Normal file
0
config/ci.ini
Normal file
Loading…
x
Reference in New Issue
Block a user