diff options
| author | Georgios Andreadis <G.Andreadis@student.tudelft.nl> | 2017-08-10 09:40:26 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-10 09:40:26 +0300 |
| commit | bc70e6ae115beb469541c12014ffdecc01a1e50c (patch) | |
| tree | 935c2ef5b1621b0e13ec76f2ca02f6912940d690 /main.py | |
| parent | 5d42f30ed30aa5b6970304569c6bd01c16078759 (diff) | |
| parent | 54617bf3268c27d63a40844216760a49f28d39e0 (diff) | |
Merge pull request #9 from atlarge-research/mariadb
Migration to MariaDB
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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'] |
