Merge pull request #504 from mslinn/fix1

This script can now be run from any directory
This commit is contained in:
Timothy Jaeryang Baek 2024-01-17 15:00:24 -08:00 committed by GitHub
commit 89b35e4556
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,7 @@
#!/usr/bin/env bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "$SCRIPT_DIR" || exit
PORT="${PORT:-8080}"
uvicorn main:app --host 0.0.0.0 --port $PORT --forwarded-allow-ips '*'
uvicorn main:app --host 0.0.0.0 --port "$PORT" --forwarded-allow-ips '*'