HungryListener's picture
Update main.py
b22f1af verified
raw
history blame contribute delete
870 Bytes
from fastapi import FastAPI
from api.resume_checker import ats_router
from api.resume_matcher import match_router
from fastapi.middleware.cors import CORSMiddleware
import uvicorn
app = FastAPI(title="Resume Processing API")
# Include API routers
app.include_router(ats_router, prefix="/ats", tags=["ATS Check"])
app.include_router(match_router, prefix="/match", tags=["Resume Matching"])
# Add CORS middleware for security
app.add_middleware(
CORSMiddleware,
allow_origins=["https://resume-analyzer-new.vercel.app"], # Only allow your website
allow_methods=["POST", "GET"], # Allow only necessary methods
allow_headers=["*"], # Allow all headers
)
@app.get("/")
def root():
return {"message": "Welcome to the Resume Processing API"}
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=7860)