From f9885a15e47e8b0045139444df09ecc2acba2a9b Mon Sep 17 00:00:00 2001 From: Mike Slinn Date: Wed, 17 Jan 2024 17:30:58 -0500 Subject: [PATCH] Can now run from any directory --- backend/start.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/start.sh b/backend/start.sh index 44e0c5810..e6d09364e 100755 --- a/backend/start.sh +++ b/backend/start.sh @@ -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 '*'