Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /DansiDanutz_MyWork-AI /projects /demo-api /backend /main.py
| """ | |
| demo-api API | |
| FastAPI application entry point. | |
| """ | |
| from fastapi import FastAPI | |
| from fastapi.middleware.cors import CORSMiddleware | |
| app = FastAPI( | |
| title="demo-api API", | |
| description="API for demo-api", | |
| version="1.0.0" | |
| ) | |
| # CORS middleware | |
| app.add_middleware( | |
| CORSMiddleware, | |
| allow_origins=["http://localhost:3000"], | |
| allow_credentials=True, | |
| allow_methods=["*"], | |
| allow_headers=["*"], | |
| ) | |
| async def root(): | |
| return {{"message": "Welcome to demo-api API"}} | |
| async def health(): | |
| return {{"status": "healthy"}} | |
| if __name__ == "__main__": | |
| import uvicorn | |
| uvicorn.run(app, host="0.0.0.0", port=8000, reload=True) | |
Xet Storage Details
- Size:
- 689 Bytes
- Xet hash:
- c0811248ba421576dbe0ee32143ed564a9307329c2bf20445b903864ef970f27
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.