mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-23 03:25:07 +03:00
Restructure backend into microservices, add envelope encryption, DM files, and message editing
This commit is contained in:
+23
-7
@@ -1,7 +1,23 @@
|
||||
from constants import *
|
||||
from db import *
|
||||
from models import *
|
||||
from validation import *
|
||||
from utils import *
|
||||
from dependencies import *
|
||||
from app import *
|
||||
try:
|
||||
# Preferred when running from project root: `python -m backend.main` or similar.
|
||||
from backend.services.main.constants import *
|
||||
from backend.services.main.db import *
|
||||
from backend.services.main.models import *
|
||||
from backend.services.main.validation import *
|
||||
from backend.services.main.utils import *
|
||||
from backend.services.main.dependencies import *
|
||||
from backend.services.main.main import *
|
||||
except ModuleNotFoundError as exc:
|
||||
# Only attempt the fallback when the missing module is the 'backend' package itself.
|
||||
if exc.name and exc.name.startswith("backend"):
|
||||
# Fallback when running with CWD=backend (e.g. `cd backend && uvicorn main:app`)
|
||||
from services.main.constants import *
|
||||
from services.main.db import *
|
||||
from services.main.models import *
|
||||
from services.main.validation import *
|
||||
from services.main.utils import *
|
||||
from services.main.dependencies import *
|
||||
from services.main.main import *
|
||||
else:
|
||||
# Re-raise (likely a missing external dependency like sqlalchemy)
|
||||
raise
|
||||
Reference in New Issue
Block a user