make rethinkdb url and port available with env var
This commit is contained in:
parent
ed8d6d5d71
commit
6ce8c11034
6
app.py
6
app.py
|
|
@ -1,12 +1,16 @@
|
|||
import os
|
||||
from flask import Flask, render_template, jsonify
|
||||
from rethinkdb import RethinkDB
|
||||
from routes.conditions import create_conditions_routes
|
||||
|
||||
rethinkUrl = os.environ.get('RETHINKDB_URL')
|
||||
rethinkPort = os.environ.get('RETHINKDB_PORT')
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
# Connect to RethinkDB
|
||||
r = RethinkDB()
|
||||
conn = r.connect('alice', 40002, db='finfree')
|
||||
conn = r.connect(rethinkUrl, rethinkPort, db='finfree')
|
||||
|
||||
create_conditions_routes(app, r, conn)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue