summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-08-13 23:17:50 +0300
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-08-13 23:17:50 +0300
commit3d086d18a2639a76c4739b6ca7ca06416356c706 (patch)
tree5c9e122ae7e84b8013e8a742714a5779f871f6ad /main.py
parentf589682b0840aab0624122052eb863cf8dc3a0b9 (diff)
parentbc70e6ae115beb469541c12014ffdecc01a1e50c (diff)
Merge branch 'master' into flat-api
Diffstat (limited to 'main.py')
-rw-r--r--main.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.py b/main.py
index 3dbb2a53..307b5356 100644
--- a/main.py
+++ b/main.py
@@ -10,7 +10,7 @@ import flask_socketio
from oauth2client import client, crypt
from opendc.models.user import User
-from opendc.util import exceptions, rest, path_parser
+from opendc.util import exceptions, rest, path_parser, database
if len(sys.argv) < 2:
print "config file path not given as argument"
@@ -22,6 +22,9 @@ with open(sys.argv[1]) as file:
STATIC_ROOT = os.path.join(KEYS['ROOT_DIR'], 'opendc-frontend', 'build')
+database.init_connection_pool(user=KEYS['MYSQL_USER'], password=KEYS['MYSQL_PASSWORD'], \
+ database=KEYS['MYSQL_DATABASE'], host=KEYS['MYSQL_HOST'], port=KEYS['MYSQL_PORT'])
+
FLASK_CORE_APP = Flask(__name__, static_url_path='')
FLASK_CORE_APP.config['SECREY_KEY'] = KEYS['FLASK_SECRET']