From d2b6957013bded9995604a06cccbba2e93c3f9e1 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 3 Apr 2026 04:51:00 +0800 Subject: [PATCH] dev: prefer .env.development in start script --- scripts/start_dev.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/start_dev.sh b/scripts/start_dev.sh index 9f3d535..6b3e66b 100755 --- a/scripts/start_dev.sh +++ b/scripts/start_dev.sh @@ -3,9 +3,14 @@ set -euo pipefail cd "$(dirname "$0")/.." source .venv/bin/activate -ENV_FILE=".env" -if [ ! -f "$ENV_FILE" ]; then - echo "missing $ENV_FILE. copy .env.example to .env first." +if [ -f ".env.development" ]; then + ENV_FILE=".env.development" +elif [ -f ".env" ]; then + ENV_FILE=".env" +else + echo "missing .env.development or .env. copy .env.example first." exit 1 fi + +echo "Loading environment from '$ENV_FILE'" exec uvicorn app.main:app --env-file "$ENV_FILE" --host 127.0.0.1 --port 8000 --reload