initial prototype for autokanban
This commit is contained in:
commit
e03b3014fe
5647 changed files with 345269 additions and 0 deletions
23
start_app.py
Normal file
23
start_app.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Activate venv if not already active
|
||||
def activate_venv():
|
||||
venv_path = os.path.join(os.path.dirname(__file__), '.venv', 'bin', 'activate_this.py')
|
||||
if os.path.exists(venv_path):
|
||||
with open(venv_path) as f:
|
||||
exec(f.read(), {'__file__': venv_path})
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Optionally activate venv (works on Linux/macOS)
|
||||
venv_python = os.path.join(os.path.dirname(__file__), '.venv', 'bin', 'python')
|
||||
if os.path.exists(venv_python):
|
||||
python_exec = venv_python
|
||||
else:
|
||||
python_exec = sys.executable
|
||||
|
||||
# Launch the FastAPI app with uvicorn
|
||||
subprocess.run([
|
||||
python_exec, '-m', 'uvicorn', 'app.main:app', '--host', '0.0.0.0', '--port', '8000', '--reload'
|
||||
])
|
||||
Loading…
Add table
Add a link
Reference in a new issue