Create the frontend receipes page to use real API
This commit is contained in:
@@ -17,7 +17,7 @@ class Settings:
|
||||
# API settings
|
||||
API_V1_PREFIX: str = "/api/v1"
|
||||
|
||||
# Database
|
||||
# Override DATABASE_URL for recipes service
|
||||
DATABASE_URL: str = os.getenv(
|
||||
"RECIPES_DATABASE_URL",
|
||||
"postgresql://recipes_user:recipes_pass@localhost:5432/recipes_db"
|
||||
@@ -27,17 +27,19 @@ class Settings:
|
||||
REDIS_URL: str = os.getenv("REDIS_URL", "redis://localhost:6379/0")
|
||||
|
||||
# External service URLs
|
||||
GATEWAY_URL: str = os.getenv("GATEWAY_URL", "http://gateway:8000")
|
||||
INVENTORY_SERVICE_URL: str = os.getenv(
|
||||
"INVENTORY_SERVICE_URL",
|
||||
"INVENTORY_SERVICE_URL",
|
||||
"http://inventory:8000"
|
||||
)
|
||||
SALES_SERVICE_URL: str = os.getenv(
|
||||
"SALES_SERVICE_URL",
|
||||
"SALES_SERVICE_URL",
|
||||
"http://sales:8000"
|
||||
)
|
||||
|
||||
# Authentication
|
||||
SECRET_KEY: str = os.getenv("SECRET_KEY", "your-secret-key-here")
|
||||
JWT_SECRET_KEY: str = os.getenv("JWT_SECRET_KEY", "your-super-secret-jwt-key-change-in-production-min-32-characters-long")
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES: int = int(os.getenv("ACCESS_TOKEN_EXPIRE_MINUTES", "30"))
|
||||
|
||||
# Logging
|
||||
|
||||
@@ -17,4 +17,9 @@ db_manager = create_database_manager(
|
||||
async def get_db():
|
||||
"""FastAPI dependency to get database session"""
|
||||
async for session in db_manager.get_db():
|
||||
yield session
|
||||
yield session
|
||||
|
||||
# Initialize database
|
||||
async def init_database():
|
||||
"""Initialize database tables"""
|
||||
await db_manager.create_tables()
|
||||
Reference in New Issue
Block a user