From 20267daadec68f43fe8c10df67be9f23cdd7bff4 Mon Sep 17 00:00:00 2001 From: "Ehsan.Asadi" Date: Tue, 30 Dec 2025 21:21:30 +0330 Subject: [PATCH] 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 --- rxconfig.py | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/rxconfig.py b/rxconfig.py index b0046b1..b5eef8f 100644 --- a/rxconfig.py +++ b/rxconfig.py @@ -1,10 +1,27 @@ -"""Reflex configuration loader. +"""Reflex configuration file. -This file imports the actual configuration from config/reflex.config.py. -Reflex requires rxconfig.py to be in the project root. +This file configures the Reflex application settings. """ -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", + ], +)