test_python / app.py
minhpng's picture
add app file
da7c758
raw
history blame
545 Bytes
import uvicorn
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from routers import get_transcript
app = FastAPI()
app.add_middleware(CORSMiddleware, allow_origins=["http://localhost:3000"], allow_credentials=True, allow_methods=["*"], allow_headers=["Content-Type", "Authorization", "x-api-key"])
app.include_router(get_transcript.router)
@app.get("/")
def read_root():
return {"message": "This is from python backend cache"}
if __name__ == '__main__':
uvicorn.run(
"app:app", reload=True)