Added commentary

Hidding server ip address
pull/8/head
sgoudham 5 years ago
parent f83aac8a54
commit a45acac2d4

@ -3,16 +3,18 @@ import sys
import mariadb
from decouple import config
# Get password/host from .env
password = config('DB_PASS')
host = config('DB_HOST')
# Connect to MariaDB Platform
def connection():
# Connect to MariaDB Platform
try:
conn = mariadb.connect(
user="hamothy",
password=password,
host="173.208.202.20",
host=host,
port=3306,
database="enso"
)
@ -20,4 +22,5 @@ def connection():
print(f"Error connecting to MariaDB Platform: {e}")
sys.exit(1)
# Returning connection string
return conn

Loading…
Cancel
Save