Shreeraj Mummidivarapu commited on
Commit
beeffb0
·
unverified ·
1 Parent(s): 717bb55

Update app.py

Browse files
Files changed (1) hide show
  1. server/app.py +9 -3
server/app.py CHANGED
@@ -1,9 +1,15 @@
 
1
  import sys
2
  import os
3
 
4
  sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
5
 
6
- from backend.main import app
7
 
8
- # Expose app at module level for uvicorn: server.app:app
9
- __all__ = ["app"]
 
 
 
 
 
 
1
+ import uvicorn
2
  import sys
3
  import os
4
 
5
  sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
6
 
7
+ from backend.main import app # app is now importable as server.app:app
8
 
9
+
10
+ def main():
11
+ uvicorn.run(app, host="0.0.0.0", port=7860)
12
+
13
+
14
+ if __name__ == "__main__":
15
+ main()