Skip to content

Commit

Permalink
test commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaPunetha committed Sep 12, 2023
1 parent ebc3f91 commit df5d7d3
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,39 +1 @@
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app import models
from app.database import engine
from app.routers import post, user, auth, vote


# models.Base.metadata.create_all(bind=engine)

app = FastAPI()

origins = [
"http://localhost.tiangolo.com",
"https://localhost.tiangolo.com",
"http://localhost",
"http://localhost:8000",
"*",
]

app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)

app.include_router(post.router)
app.include_router(user.router)
app.include_router(auth.router)
app.include_router(vote.router)


@app.get("/")
def root():
return {"message": "Hello World"}


# uvicorn app.main:app --reload
file_content

0 comments on commit df5d7d3

Please sign in to comment.