This commit is contained in:
2025-07-16 20:24:26 +05:00
commit c6d78e3648
8 changed files with 284 additions and 0 deletions

15
auth/app/database.py Normal file
View File

@ -0,0 +1,15 @@
from motor.motor_asyncio import AsyncIOMotorClient
from dotenv import load_dotenv
import os
load_dotenv()
MONGO_URI = os.getenv("MONGO_URI", "mongodb://localhost:32768")
DB_NAME = "minecraft_auth"
client = AsyncIOMotorClient(MONGO_URI)
db = client[DB_NAME]
# Коллекции
users_collection = db["users"]
sessions_collection = db["sessions"]