Refactor environment variable handling in package.json scripts, update .env.example for consistency, and enhance Turbo configuration for environment variable passthrough. Modify API content type parsing and resolve circular dependencies in Auth and Billing modules. Add unique username generation logic in bootstrap-admin script.
This commit is contained in:
34
scripts/dev-stop.sh
Executable file
34
scripts/dev-stop.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
PID_FILE="$ROOT/.logs/dev.pid"
|
||||
|
||||
if [[ -f "$PID_FILE" ]]; then
|
||||
PID="$(cat "$PID_FILE")"
|
||||
if kill -0 "$PID" 2>/dev/null; then
|
||||
kill "$PID" 2>/dev/null || true
|
||||
sleep 1
|
||||
kill -0 "$PID" 2>/dev/null && kill -9 "$PID" 2>/dev/null || true
|
||||
echo "Dev server gestoppt (PID $PID)."
|
||||
else
|
||||
echo "Prozess $PID läuft nicht mehr."
|
||||
fi
|
||||
rm -f "$PID_FILE"
|
||||
else
|
||||
echo "Kein Dev-Server-PID-File gefunden."
|
||||
fi
|
||||
|
||||
# Turbo/Next/Nest Kindprozesse beenden (Ports 3000–3003 freigeben).
|
||||
pkill -f "turbo run dev" 2>/dev/null || true
|
||||
pkill -f "next dev" 2>/dev/null || true
|
||||
pkill -f "nest start --watch" 2>/dev/null || true
|
||||
pkill -f "tsx watch src/index.ts" 2>/dev/null || true
|
||||
|
||||
for port in 3000 3001 3002 3003; do
|
||||
if command -v fuser >/dev/null 2>&1; then
|
||||
fuser -k "${port}/tcp" 2>/dev/null || true
|
||||
elif command -v lsof >/dev/null 2>&1; then
|
||||
lsof -ti ":${port}" -sTCP:LISTEN 2>/dev/null | xargs -r kill -9 2>/dev/null || true
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user