Created
June 6, 2019 12:49
-
-
Save serainville/50b3e34160bf74ce4376de0fa217a8f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flaskext.mysql import MySQL | |
import os | |
from flask import Flask | |
app = Flask(__name__) | |
mysql = MySQL() | |
# MySQL configurations | |
app.config['MYSQL_DATABASE_USER'] = os.environ['db_username'] | |
app.config['MYSQL_DATABASE_PASSWORD'] = os.environ['db_password'] | |
app.config['MYSQL_DATABASE_DB'] = os.environ['db_name'] | |
app.config['MYSQL_DATABASE_HOST'] = '192.168.1.213' | |
mysql.init_app(app) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment