diff --git a/backend/.env b/backend/.env index 0cfac72..3fa7020 100644 --- a/backend/.env +++ b/backend/.env @@ -1,3 +1 @@ DB_PASSWORD=sLEQDIgpabTTlLEy -//server url -// diff --git a/backend/__pycache__/database.cpython-313.pyc b/backend/__pycache__/database.cpython-313.pyc index 88f765d..96cc71b 100644 Binary files a/backend/__pycache__/database.cpython-313.pyc and b/backend/__pycache__/database.cpython-313.pyc differ diff --git a/backend/database.py b/backend/database.py index a8cc8d1..91a6361 100644 --- a/backend/database.py +++ b/backend/database.py @@ -1,10 +1,16 @@ +import os +from dotenv import load_dotenv from sqlalchemy import create_engine, Column, Integer, String, ForeignKey, DateTime from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker, relationship from datetime import datetime from sqlalchemy.dialects.postgresql import ARRAY -DATABASE_URL = "postgresql://postgres.gmpgjtjmalohyjsespkr:sLEQDIgpabTTlLEy@aws-0-ap-northeast-2.pooler.supabase.com:6543/postgres" +load_dotenv() + +DB_PASSWORD = os.getenv("DB_PASSWORD") + +DATABASE_URL = f"postgresql://postgres.gmpgjtjmalohyjsespkr:{DB_PASSWORD}@aws-0-ap-northeast-2.pooler.supabase.com:6543/postgres" engine = create_engine( DATABASE_URL,