-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
21 lines (17 loc) · 802 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from fastapi import FastAPI, responses
from auth.controllers import auth_router
from users.controllers import profile_router
from jobs.controllers import jobs_router
from company.controllers import company_router
from education.controllers import education_router
from auth.social_auth.controllers import social_router
from fastapi.middleware.cors import CORSMiddleware
app = FastAPI(default_response_class=responses.ORJSONResponse)
app.include_router(auth_router)
app.include_router(profile_router)
app.include_router(jobs_router)
app.include_router(company_router)
app.include_router(education_router)
app.include_router(social_router)
origins = ['http://127.0.0.1:8000']
app.add_middleware(CORSMiddleware, allow_origins=origins, allow_credentials=True, allow_methods=['*'], allow_headers=['*'])