diff --git a/.gitignore b/.gitignore index c8ce53e..2920eef 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ __pycache__/ *.pyc data/ +server.log diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..315ad56 --- /dev/null +++ b/run.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# launch (or restart) the ani-web server +cd "$(dirname "$0")" || exit 1 +[ -x .venv/bin/python ] || { echo "no .venv — run: uv venv .venv && uv pip install --python .venv/bin/python -r requirements.txt"; exit 1; } +pkill -f "[u]vicorn app:app" 2>/dev/null; sleep 1 +nohup .venv/bin/python -m uvicorn app:app --host 0.0.0.0 --port 8321 > server.log 2>&1 & +echo "ani-web on http://localhost:8321 (pid $!)"