working for the most part
This commit is contained in:
11
app/db_connection.py
Normal file
11
app/db_connection.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import mysql.connector
|
||||
import os
|
||||
|
||||
def get_connection():
|
||||
return mysql.connector.connect(
|
||||
host=os.getenv('DB_HOST'),
|
||||
port=int(os.getenv('DB_PORT', 3306)),
|
||||
user=os.getenv('DB_USER'),
|
||||
password=os.getenv('DB_PASSWORD'),
|
||||
database=os.getenv('DB_NAME'),
|
||||
)
|
||||
Reference in New Issue
Block a user