Spaces:
Sleeping
Sleeping
Download server.py from Freight/daisy-rrhh-backend: direct link, hf CLI and curl.
- Browser
- Download file 423 Bytes
-
https://huggingface.co/spaces/Freight/daisy-rrhh-backend/resolve/main/server.py
- Command line
-
hf download hf://spaces/Freight/daisy-rrhh-backend/server.py
-
curl -L -o server.py https://huggingface.co/spaces/Freight/daisy-rrhh-backend/resolve/main/server.py
423 Bytes
| from src.api.routes import router | |
| from fastapi import FastAPI | |
| from fastapi.middleware.cors import CORSMiddleware | |
| import os | |
| import dotenv | |
| dotenv.load_dotenv() | |
| app = FastAPI() | |
| app.add_middleware( | |
| CORSMiddleware, | |
| allow_origins=["http://localhost:3000", os.environ.get("FRONT")], | |
| #allow_origins=["*"], | |
| allow_credentials=True, | |
| allow_methods=["*"], | |
| allow_headers=["*"], | |
| ) | |
| app.include_router(router) |