Adjustment in application config

This commit is contained in:
Khanh Ngo
2016-04-13 11:13:59 +07:00
parent 454dce2d71
commit 53b4fe2f8b
4 changed files with 24 additions and 8 deletions

7
run.py
View File

@@ -2,5 +2,10 @@
from app import app
from config import PORT
try:
from config import BIND_ADDRESS
except:
BIND_ADDRESS = '127.0.0.1'
if __name__ == '__main__':
app.run(debug = True, port=PORT)
app.run(debug = True, host=BIND_ADDRESS, port=PORT)