fix: restore rxconfig.py to root with updated DB path

- Keep rxconfig.py in root as required by Reflex
- Update DB path to data/reflex.db
- Keep config/reflex.config.py as backup/reference
This commit is contained in:
Ehsan.Asadi
2025-12-30 21:21:30 +03:30
parent 6820f0ee4f
commit 20267daade

View File

@@ -1,10 +1,27 @@
"""Reflex configuration loader. """Reflex configuration file.
This file imports the actual configuration from config/reflex.config.py. This file configures the Reflex application settings.
Reflex requires rxconfig.py to be in the project root.
""" """
from config.reflex.config import config import os
import reflex as rx
__all__ = ["config"] # Environment-aware configuration
API_URL = os.getenv("API_URL", "http://localhost:8000")
FRONTEND_PORT = int(os.getenv("FRONTEND_PORT", "3000"))
BACKEND_PORT = int(os.getenv("BACKEND_PORT", "8000"))
DB_URL = os.getenv("DATABASE_URL", "sqlite:///data/reflex.db")
config = rx.Config(
app_name="peikarband",
api_url=API_URL,
frontend_port=FRONTEND_PORT,
backend_port=BACKEND_PORT,
db_url=DB_URL,
disable_plugins=["reflex.plugins.sitemap.SitemapPlugin"],
stylesheets=[
"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap",
"https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css",
],
)