feat: add FastAPI backend with PostgreSQL and start script fixes
- Add server/ directory with FastAPI backend - Fix server/start.sh to properly handle venv on Windows/Git Bash - Add alembic migrations and pyproject.toml - Add server tests Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
13
server/src/app/api/deps.py
Normal file
13
server/src/app/api/deps.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from collections.abc import Generator
|
||||
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from app.db.session import get_session_factory
|
||||
|
||||
|
||||
def get_db() -> Generator[Session, None, None]:
|
||||
db = get_session_factory()()
|
||||
try:
|
||||
yield db
|
||||
finally:
|
||||
db.close()
|
||||
Reference in New Issue
Block a user