Skip to content

Commit 6127ed2

Browse files
committed
updated the toml file, app.py and generated the uv.lock
1 parent d9ae7c7 commit 6127ed2

File tree

3 files changed

+570
-1
lines changed

3 files changed

+570
-1
lines changed

src/envs/warehouse_env/pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@ classifiers = [
2828
]
2929

3030
dependencies = [
31+
"openenv-core",
3132
"fastapi>=0.104.1",
3233
"uvicorn>=0.24.0",
33-
"pydantic>=2.5.0",
3434
"requests>=2.31.0",
35+
"pydantic>=2.5.0",
3536
]
3637

38+
[project.scripts]
39+
warehouse-server = "envs.warehouse_env.server.app:main"
40+
3741
[project.optional-dependencies]
3842
dev = [
3943
"pytest>=7.0.0",

src/envs/warehouse_env/server/app.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,13 @@ async def health():
6969
import uvicorn
7070

7171
uvicorn.run(app, host="0.0.0.0", port=8000)
72+
73+
def main():
74+
"""Entry point for warehouse-server command."""
75+
import uvicorn
76+
import os
77+
78+
port = int(os.getenv("PORT", "8000"))
79+
host = os.getenv("HOST", "0.0.0.0")
80+
81+
uvicorn.run(app, host=host, port=port)

0 commit comments

Comments
 (0)