fullbackend / run_backend_with_sqlite.py
alishba526's picture
something add
2e76a54
Raw History Blame Contribute Delete
539 Bytes
import os
import sys
# Clear any existing DATABASE_URL environment variable to ensure it uses the .env file
if 'DATABASE_URL' in os.environ:
del os.environ['DATABASE_URL']
# Import settings after clearing the environment variable
from src.config import settings
print(f"Using DATABASE_URL: {settings.DATABASE_URL}")
# Now run the server
import uvicorn
from src.main import app
if __name__ == "__main__":
uvicorn.run(
app,
host="127.0.0.1",
port=9000,
reload=False,
log_level="info"
)