3v324v23 commited on
Commit
ac23714
·
1 Parent(s): c7d0094

add main function

Browse files
Files changed (3) hide show
  1. pyproject.toml +6 -2
  2. server/__init__.py +0 -0
  3. server/app.py +8 -1
pyproject.toml CHANGED
@@ -11,5 +11,9 @@ dependencies = [
11
  "uvicorn",
12
  "pydantic",
13
  "requests",
14
- "openai"
15
- ]
 
 
 
 
 
11
  "uvicorn",
12
  "pydantic",
13
  "requests",
14
+ "openai",
15
+ "openenv-core>=0.2.0"
16
+ ]
17
+
18
+ [project.scripts]
19
+ server = "server.app:main"
server/__init__.py ADDED
File without changes
server/app.py CHANGED
@@ -13,4 +13,11 @@ app = create_fastapi_app(
13
 
14
  if __name__ == "__main__":
15
  print("🚀 Starting Meta Ad-Policy Sandbox on http://localhost:8000")
16
- uvicorn.run(app, host="0.0.0.0", port=8000)
 
 
 
 
 
 
 
 
13
 
14
  if __name__ == "__main__":
15
  print("🚀 Starting Meta Ad-Policy Sandbox on http://localhost:8000")
16
+ uvicorn.run(app, host="0.0.0.0", port=8000)
17
+
18
+
19
+ def main():
20
+ uvicorn.run("server.app:app", host="0.0.0.0", port=8000)
21
+
22
+ if __name__ == "__main__":
23
+ main()