#!/bin/bash set -e # Start the CRM app in native development mode. # Dependencies must already be running (see scripts/dev/start-deps.sh). # Usage: scripts/dev/start-dev.sh SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)" cd "${PROJECT_ROOT}" if [[ ! -f .env.local ]]; then echo "ERROR: .env.local not found." exit 1 fi # Quick check that key dependencies are reachable echo "=== Checking dependencies ===" if ! curl -sf http://localhost:5000/api/health >/dev/null 2>&1; then echo "Note: app is not yet running on localhost:5000 (expected)." fi echo "=== Starting CRM dev server ===" echo "Make sure dependencies are running: scripts/dev/start-deps.sh" echo "" export NODE_ENV=development npm run dev