vinith17 commited on
Commit
362b7f2
·
1 Parent(s): 3858299

fix: server/app.py main() function + if __name__ guard + entry point :main

Browse files
Files changed (2) hide show
  1. pyproject.toml +1 -1
  2. server/app.py +9 -1
pyproject.toml CHANGED
@@ -16,7 +16,7 @@ dependencies = [
16
  ]
17
 
18
  [project.scripts]
19
- server = "server.app:app"
20
 
21
  [build-system]
22
  requires = ["setuptools>=68.0"]
 
16
  ]
17
 
18
  [project.scripts]
19
+ server = "server.app:main"
20
 
21
  [build-system]
22
  requires = ["setuptools>=68.0"]
server/app.py CHANGED
@@ -1,4 +1,12 @@
1
  """server/app.py — OpenEnv multi-mode entry point."""
 
2
  from main import app
3
 
4
- __all__ = ["app"]
 
 
 
 
 
 
 
 
1
  """server/app.py — OpenEnv multi-mode entry point."""
2
+ import uvicorn
3
  from main import app
4
 
5
+
6
+ def main():
7
+ """Start the CodeBug server."""
8
+ uvicorn.run(app, host="0.0.0.0", port=7860)
9
+
10
+
11
+ if __name__ == "__main__":
12
+ main()