init
This commit is contained in:
15
auth/app/database.py
Normal file
15
auth/app/database.py
Normal 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"]
|
Reference in New Issue
Block a user