Files
pulse/start-pulse.sh
T
courtmanr@gmail.com 6fb71a9443 v1.0.11
2025-03-01 16:56:32 +00:00

31 lines
797 B
Bash
Executable File

#!/bin/bash
# Make script executable if it isn't already
chmod +x "$0"
# Kill any existing servers
echo "Killing any existing servers..."
pkill -f "node dist/server.js" || true
npx kill-port 9513 7654
# Start the real backend server
echo "Starting real backend server..."
npm run dev &
BACKEND_PID=$!
# Wait a moment for the server to start
sleep 3
# Get the host IP (use 0.0.0.0 in Docker, otherwise use localhost or your local IP)
HOST_IP="0.0.0.0"
if [[ -z "${DOCKER_CONTAINER}" ]]; then
# Not in Docker, use localhost or your specific IP
HOST_IP="localhost"
fi
# Start the frontend Vite dev server
echo "Starting Pulse interface..."
cd frontend && npm run dev -- --host "${HOST_IP}" --port ${VITE_PORT:-9513}
# When the frontend exits, also kill the backend server
kill $BACKEND_PID