From 7c4364b52f82f9654082e0734598c6cdaa98c668 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 3 Apr 2026 04:31:58 +0800 Subject: [PATCH] Use single .env for local startup --- scripts/start_dev.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/start_dev.sh b/scripts/start_dev.sh index 7fa39aa..9f3d535 100755 --- a/scripts/start_dev.sh +++ b/scripts/start_dev.sh @@ -3,4 +3,9 @@ set -euo pipefail cd "$(dirname "$0")/.." source .venv/bin/activate -exec uvicorn app.main:app --env-file .env.development --host 127.0.0.1 --port 8000 --reload +ENV_FILE=".env" +if [ ! -f "$ENV_FILE" ]; then + echo "missing $ENV_FILE. copy .env.example to .env first." + exit 1 +fi +exec uvicorn app.main:app --env-file "$ENV_FILE" --host 127.0.0.1 --port 8000 --reload