-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
49 lines (41 loc) · 1.79 KB
/
main.py
File metadata and controls
49 lines (41 loc) · 1.79 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
app = FastAPI(
title="SkillSync API",
description="Backend API for SkillSync with Talent Matching and Scraper capabilities",
version="1.0.0"
)
# CORS Configuration
origins = [
"http://localhost:5173",
"http://127.0.0.1:5173",
"https://skillsync-edu.vercel.app",
]
app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
from app.api import scholarships, industry, recommendation, internships, communication, auth, students, matching, google_auth, skills
app.include_router(auth.router, prefix="/api/auth", tags=["auth"])
app.include_router(students.router, prefix="/api/students", tags=["students"])
app.include_router(matching.router, prefix="/api/matches", tags=["matches"])
app.include_router(scholarships.router, prefix="/api/scholarships", tags=["scholarships"])
app.include_router(internships.router, prefix="/api/internships", tags=["internships"])
app.include_router(industry.router, prefix="/api/industry", tags=["industry"])
app.include_router(recommendation.router, prefix="/api/recommendation", tags=["recommendation"])
app.include_router(communication.router, prefix="/api/communication", tags=["communication"])
app.include_router(google_auth.router, prefix="/api/auth", tags=["google-auth"])
app.include_router(skills.router, prefix="/api/skills", tags=["skills"])
@app.get("/")
async def root():
return {"message": "SkillSync API is running", "status": "active"}
@app.api_route("/health", methods=["GET", "HEAD"])
async def health_check():
return {"status": "healthy"}
@app.get("/favicon.ico", include_in_schema=False)
async def favicon():
from fastapi import Response
return Response(status_code=204)