|
|
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") |
|
|
|
|
|
|
|
|
|
|
|
app.include_router(ats_router, prefix="/ats", tags=["ATS Check"]) |
|
|
app.include_router(match_router, prefix="/match", tags=["Resume Matching"]) |
|
|
|
|
|
|
|
|
app.add_middleware( |
|
|
CORSMiddleware, |
|
|
allow_origins=["https://resume-analyzer-new.vercel.app"], |
|
|
allow_methods=["POST", "GET"], |
|
|
allow_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) |
|
|
|