Read app port from config.py

This commit is contained in:
Khanh Ngo 2015-12-14 16:38:47 +07:00
parent b0e3e6a911
commit e1e1b1d9bd
3 changed files with 4 additions and 2 deletions

View File

@ -30,7 +30,7 @@ MariaDB [(none)]> GRANT ALL PRIVIELGES ON powerdnsadmin.* TO powerdnsadmin@'%' I
### PowerDNS-Admin
In this installation guide, I am using CentOS 7 and run my pythong stuffs with *virtualenv*. If you don't have it, let install:
In this installation guide, I am using CentOS 7 and run my python stuffs with *virtualenv*. If you don't have it, let install:
```
$ sudo yum install python-pip
$ sudo pip install virtualenv

View File

@ -4,6 +4,7 @@ basedir = os.path.abspath(os.path.dirname(__file__))
# BASIC APP CONFIG
WTF_CSRF_ENABLED = True
SECRET_KEY = 'We are the world'
PORT = 9393
# LOG CONFIG
LOG_LEVEL = 'DEBUG'

3
run.py
View File

@ -1,5 +1,6 @@
#!flask/bin/python
from app import app
from config import PORT
if __name__ == '__main__':
app.run(debug = True, port=9191)
app.run(debug = True, port=PORT)