- Backend: Downgrade Pydantic from v2 to v1.10.13 for compatibility - Backend: Fix ObjectId to string conversion in user service - Backend: Update config to use pydantic BaseSettings (v1 import) - Frontend: Downgrade ESLint packages for compatibility - Frontend: Configure Vite proxy to use 127.0.0.1 instead of localhost - Frontend: Set API client to use direct backend URL (127.0.0.1:8101) - Frontend: Add package-lock.json for dependency locking This resolves MongoDB connection issues and frontend-backend communication problems caused by localhost resolving to IPv6. Verified: Login and dashboard functionality working correctly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
33 lines
729 B
Python
33 lines
729 B
Python
from pydantic import BaseSettings
|
|
from typing import List
|
|
|
|
class Settings(BaseSettings):
|
|
# MongoDB
|
|
MONGODB_URL: str = "mongodb://localhost:27017"
|
|
DB_NAME: str = "news_engine_console_db"
|
|
|
|
# Redis
|
|
REDIS_URL: str = "redis://localhost:6379"
|
|
|
|
# JWT
|
|
SECRET_KEY: str = "dev-secret-key-change-in-production"
|
|
ALGORITHM: str = "HS256"
|
|
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
|
|
|
# Service
|
|
SERVICE_NAME: str = "news-engine-console"
|
|
API_V1_STR: str = "/api/v1"
|
|
PORT: int = 8101
|
|
|
|
# CORS
|
|
ALLOWED_ORIGINS: List[str] = [
|
|
"http://localhost:3000",
|
|
"http://localhost:3100"
|
|
]
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
case_sensitive = True
|
|
|
|
settings = Settings()
|