Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -837,6 +837,19 @@ async def search_repos(query: str, sort: Optional[str] = None, order: str = "des
|
|
| 837 |
data = await _client.search_repositories(query, sort, order, limit)
|
| 838 |
return [_summarize_repo(repo) for repo in data]
|
| 839 |
|
|
|
|
|
|
|
|
|
|
| 840 |
|
| 841 |
if __name__ == "__main__":
|
| 842 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 837 |
data = await _client.search_repositories(query, sort, order, limit)
|
| 838 |
return [_summarize_repo(repo) for repo in data]
|
| 839 |
|
| 840 |
+
@server.app.get("/")
|
| 841 |
+
def health():
|
| 842 |
+
return {"status": "ok"}
|
| 843 |
|
| 844 |
if __name__ == "__main__":
|
| 845 |
+
import os
|
| 846 |
+
import uvicorn
|
| 847 |
+
|
| 848 |
+
port = int(os.getenv("PORT", 8000))
|
| 849 |
+
|
| 850 |
+
uvicorn.run(
|
| 851 |
+
server.app,
|
| 852 |
+
host="0.0.0.0",
|
| 853 |
+
port=port,
|
| 854 |
+
log_level="info"
|
| 855 |
+
)
|