From fe69ca8ce88b51b0117aebfbb512fef16b4ebb35 Mon Sep 17 00:00:00 2001 From: xuatz Date: Thu, 17 Jul 2025 17:24:33 +0900 Subject: feat(mobile): Add user setting for default bookmark view mode (#1723) * feat(mobile): add user setting for default bookmark view mode * regen db migration script * clean up implementation * Update docs/docs/07-Development/01-setup.md * Update GEMINI.md * use local setting instead of storing value in db * improve start-dev.sh to also handle for db migration * rename mobileBookmarkClickDefaultViewMode to defaultBookmarkView for consistency --- start-dev.sh | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'start-dev.sh') diff --git a/start-dev.sh b/start-dev.sh index a421be34..0f5f9d2e 100755 --- a/start-dev.sh +++ b/start-dev.sh @@ -50,9 +50,33 @@ if [ ! -d "node_modules" ]; then pnpm install fi -# Start the web app and workers in parallel -echo "Starting web app and workers..." +# Get DATA_DIR from environment or .env file +if [ -z "$DATA_DIR" ] && [ -f ".env" ]; then + DATA_DIR=$(grep "^DATA_DIR=" .env | cut -d'=' -f2) +fi + +# Create DATA_DIR if it doesn't exist +if [ -n "$DATA_DIR" ] && [ ! -d "$DATA_DIR" ]; then + echo "Creating DATA_DIR at $DATA_DIR..." + mkdir -p "$DATA_DIR" +fi + +# Start the web app +echo "Starting web app..." pnpm web & WEB_PID=$! + +# Wait for web app to be ready +echo "Waiting for web app to start..." +until curl -s http://localhost:3000 > /dev/null 2>&1; do + sleep 1 +done + +# Run database migrations +echo "Running database migrations..." +pnpm run db:migrate + +# Start workers +echo "Starting workers..." pnpm workers & WORKERS_PID=$! # Function to handle script termination -- cgit v1.2.3-70-g09d2