File size: 870 Bytes
9ea8f31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b22f1af
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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)