Presumably production ready xD
This commit is contained in:
32
start_api.py
32
start_api.py
@@ -1,12 +1,30 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Convenience launcher for the Wix Form Handler API."""
|
||||
"""Convenience launcher for the Alpine Bits Python Server API (Development Mode)."""
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
# Change to src directory
|
||||
src_dir = os.path.join(os.path.dirname(__file__), "src/alpine_bits_python")
|
||||
|
||||
# Run the API using uv
|
||||
# Run the API using uv with development settings
|
||||
# This includes:
|
||||
# - Auto-reload enabled for code changes
|
||||
# - Single worker for easier debugging
|
||||
# - Port 8080 for development
|
||||
if __name__ == "__main__":
|
||||
subprocess.run(["uv", "run", "python", os.path.join(src_dir, "run_api.py")], check=False)
|
||||
subprocess.run(
|
||||
[
|
||||
"uv",
|
||||
"run",
|
||||
"python",
|
||||
"-m",
|
||||
"alpine_bits_python.run_api",
|
||||
"--host",
|
||||
"0.0.0.0",
|
||||
"--port",
|
||||
"8080",
|
||||
"--workers",
|
||||
"1",
|
||||
"--reload",
|
||||
"--log-level",
|
||||
"info",
|
||||
],
|
||||
check=False,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user