summaryrefslogtreecommitdiff
path: root/app/main.py
diff options
context:
space:
mode:
authorRasmus Luha <rasmus.luha@gmail.com>2022-02-06 13:41:11 +0200
committerRasmus Luha <rasmus.luha@gmail.com>2022-02-06 13:41:11 +0200
commit6a6afdbe72c626b01245c9372c9d10be79789bb0 (patch)
treecfdb5aea7538296bad0105c813fce4cd33c19ef5 /app/main.py
parent5e19a0569288de21365c61b0db78639880732dd0 (diff)
restrucurring the stucture of the folderstruture --> structure
Diffstat (limited to 'app/main.py')
-rw-r--r--app/main.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/main.py b/app/main.py
new file mode 100644
index 0000000..87db9d0
--- /dev/null
+++ b/app/main.py
@@ -0,0 +1,17 @@
+from fastapi import FastAPI
+from . import models
+from .database import engine, SessionLocal
+from .routers import post, user, auth, vote
+from .config import settings
+
+models.Base.metadata.create_all(bind=engine)
+app = FastAPI()
+
+app.include_router(post.router)
+app.include_router(user.router)
+app.include_router(auth.router)
+app.include_router(vote.router)
+
+@app.get("/")
+async def root():
+ return {"message" : "Hellow piipl"}