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:
28
scripts/dev-bg.sh
Executable file
28
scripts/dev-bg.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
PID_FILE="$ROOT/.logs/dev.pid"
|
||||
LOG_FILE="$ROOT/.logs/dev.log"
|
||||
|
||||
mkdir -p "$ROOT/.logs"
|
||||
|
||||
if [[ -f "$PID_FILE" ]] && kill -0 "$(cat "$PID_FILE")" 2>/dev/null; then
|
||||
echo "Dev server läuft bereits (PID $(cat "$PID_FILE"))."
|
||||
echo "Log: $LOG_FILE"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Next.js Dev braucht einen sauberen .next-Ordner (Production-Build stört).
|
||||
rm -rf "$ROOT/apps/web/.next"
|
||||
|
||||
# shellcheck source=scripts/load-env.sh
|
||||
source "$ROOT/scripts/load-env.sh"
|
||||
cd "$ROOT"
|
||||
|
||||
nohup pnpm turbo run dev >"$LOG_FILE" 2>&1 &
|
||||
echo $! >"$PID_FILE"
|
||||
|
||||
echo "Dev server gestartet (PID $(cat "$PID_FILE"))."
|
||||
echo "Log: $LOG_FILE"
|
||||
echo "Web: http://localhost:3000"
|
||||
Reference in New Issue
Block a user