Add port to config file.

This commit is contained in:
mattbk
2017-12-09 04:28:16 +00:00
parent cbe48732e9
commit 06c9e9357a
2 changed files with 8 additions and 1 deletions

2
config.ini Normal file
View File

@ -0,0 +1,2 @@
[DEFAULT]
PORT = 8080

View File

@ -51,8 +51,13 @@ import arrow
import json
import plotly
import sqlite3
import ConfigParser
from plotly.graph_objs import *
config = ConfigParser.ConfigParser()
config.read("config.ini")
port = config.getint('DEFAULT', 'PORT')
app = Flask(__name__)
app.debug = True # Make this False if you are no longer debugging
@ -217,4 +222,4 @@ def validate_date(d):
return False
if __name__ == "__main__":
app.run(host='0.0.0.0', port=8080)
app.run(host='0.0.0.0', port=port)