20 lines
440 B
Python
20 lines
440 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Простой тест для проверки работы FastAPI
|
|
"""
|
|
from fastapi import FastAPI
|
|
|
|
app = FastAPI(title="Test API")
|
|
|
|
@app.get("/")
|
|
async def root():
|
|
return {"message": "Test API is working"}
|
|
|
|
@app.get("/health")
|
|
async def health():
|
|
return {"status": "ok"}
|
|
|
|
if __name__ == "__main__":
|
|
import uvicorn
|
|
print("Starting test server...")
|
|
uvicorn.run(app, host="0.0.0.0", port=8000) |