Skip to content

Commit

Permalink
start refactoring database.py
Browse files Browse the repository at this point in the history
  • Loading branch information
squi-ddy committed Dec 1, 2023
1 parent 4165927 commit 4a80ba9
Show file tree
Hide file tree
Showing 7 changed files with 2,276 additions and 1,599 deletions.
15 changes: 15 additions & 0 deletions server/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from fastapi import Depends, FastAPI
from .models import Base, engine, SessionLocal

Base.metadata.create_all(bind=engine)

app = FastAPI()

def get_db():
db = SessionLocal()
try:
yield db
finally:
db.close()

@app.post("/login")
Loading

0 comments on commit 4a80ba9

Please sign in to comment.