dev.sh
Ricky/StrongPassword/backend/scripts/dev.sh
#!/bin/bash
# Development script for backend
# This script kills any existing process on port 4000 and starts the server
echo "🔧 Starting backend development server..."
# Kill any existing process on port 4000
echo "🛑 Checking for existing processes on port 4000..."
EXISTING_PID=$(lsof -ti:4000)
if [ ! -z "$EXISTING_PID" ]; then
echo "⚠️ Found existing process (PID: $EXISTING_PID), killing it..."
kill -9 $EXISTING_PID
sleep 2
echo "✅ Process killed"
else
echo "✅ Port 4000 is free"
fi
# Start the development server
echo "🚀 Starting development server..."
npm run dev
Artigos relacionados
__init__.py
__init__.py — python source code from the Ricky learning materials (Ricky/Cat Project Final/back_web-4/app/__init__.py).
Ler artigo →auth.py
auth.py — python source code from the Ricky learning materials (Ricky/Cat Project Final/back_web-4/app/admin/auth.py).
Ler artigo →routes.py
routes.py — python source code from the Ricky learning materials (Ricky/Cat Project Final/back_web-4/app/admin/routes.py).
Ler artigo →config.py
config.py — python source code from the Ricky learning materials (Ricky/Cat Project Final/back_web-4/app/config.py).
Ler artigo →admin_ingest.py
admin_ingest.py — python source code from the Ricky learning materials (Ricky/Cat Project Final/back_web-4/app/routes/admin_ingest.py).
Ler artigo →admin_stats.py
admin_stats.py — python source code from the Ricky learning materials (Ricky/Cat Project Final/back_web-4/app/routes/admin_stats.py).
Ler artigo →