Spaces:
Sleeping
Sleeping
Commit ·
b79af36
1
Parent(s): 1f2495e
fix server entry point
Browse files- pyproject.toml +1 -1
- server/app.py +8 -1
pyproject.toml
CHANGED
|
@@ -20,4 +20,4 @@ build-backend = "hatchling.build"
|
|
| 20 |
packages = ["sql_env"]
|
| 21 |
|
| 22 |
[project.scripts]
|
| 23 |
-
server = "server
|
|
|
|
| 20 |
packages = ["sql_env"]
|
| 21 |
|
| 22 |
[project.scripts]
|
| 23 |
+
server = "server.app:main"
|
server/app.py
CHANGED
|
@@ -1 +1,8 @@
|
|
| 1 |
-
from server import app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from server import app
|
| 2 |
+
import uvicorn
|
| 3 |
+
|
| 4 |
+
def main():
|
| 5 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|
| 6 |
+
|
| 7 |
+
if __name__ == "__main__":
|
| 8 |
+
main()
|