diff --git a/backend/app/__pycache__/__init__.cpython-313.pyc b/backend/app/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000..6ecadd8 Binary files /dev/null and b/backend/app/__pycache__/__init__.cpython-313.pyc differ diff --git a/backend/app/__pycache__/main.cpython-313.pyc b/backend/app/__pycache__/main.cpython-313.pyc new file mode 100644 index 0000000..931f36d Binary files /dev/null and b/backend/app/__pycache__/main.cpython-313.pyc differ diff --git a/backend/api/__init__.py b/backend/app/api/__init__.py similarity index 100% rename from backend/api/__init__.py rename to backend/app/api/__init__.py diff --git a/backend/app/api/__pycache__/__init__.cpython-313.pyc b/backend/app/api/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000..6abc934 Binary files /dev/null and b/backend/app/api/__pycache__/__init__.cpython-313.pyc differ diff --git a/backend/app/api/v1/__init__.py b/backend/app/api/v1/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/backend/app/api/v1/__pycache__/__init__.cpython-313.pyc b/backend/app/api/v1/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000..00ba8a6 Binary files /dev/null and b/backend/app/api/v1/__pycache__/__init__.cpython-313.pyc differ diff --git a/backend/app/api/v1/__pycache__/posts.cpython-313.pyc b/backend/app/api/v1/__pycache__/posts.cpython-313.pyc new file mode 100644 index 0000000..c534030 Binary files /dev/null and b/backend/app/api/v1/__pycache__/posts.cpython-313.pyc differ diff --git a/backend/app/api/v1/guestbook.py b/backend/app/api/v1/guestbook.py new file mode 100644 index 0000000..e69de29 diff --git a/backend/app/api/v1/posts.py b/backend/app/api/v1/posts.py new file mode 100644 index 0000000..cdc6b30 --- /dev/null +++ b/backend/app/api/v1/posts.py @@ -0,0 +1,33 @@ +from fastapi import APIRouter + +router = APIRouter( + prefix="/posts", + tags=["posts"], + responses={404: {"description": "Not found"}}, +) + +@router.get("/") +async def get_posts(): + pass + + +@router.get("/{id}") +async def get_post(id: int): + pass + + +@router.post("/") +async def create_post(): + pass + + +@router.put("/{id}") +async def update_post(id: int): + pass + + +@router.delete("/{id}") +async def delete_post(id: int): + pass + + diff --git a/backend/app/main.py b/backend/app/main.py index 7f8f65f..a4dc07d 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -1,8 +1,12 @@ import fastapi import uvicorn +#Import routes +from app.api.v1.posts import router as post_router + app = fastapi.FastAPI() +#Include routes +app.include_router(post_router) -if __name__ == "__main__": - uvicorn.run(app, host="0.0.0.0", port=8000) + diff --git a/backend/dockerfile b/backend/dockerfile index 61ba391..310133b 100644 --- a/backend/dockerfile +++ b/backend/dockerfile @@ -12,4 +12,4 @@ COPY . . EXPOSE 8000 -CMD ["uv", "run", "app/main.py"] +CMD ["uv", "run", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]