Add start/stop/restart scripts and USER_GUIDE documentation

This commit is contained in:
2026-07-22 17:09:46 -04:00
parent 0f2d6bb738
commit 64e929bc32
5 changed files with 6209 additions and 0 deletions
Executable
+34
View File
@@ -0,0 +1,34 @@
#!/usr/bin/env bash
# Start script for AI Job Application server
APP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PID_FILE="$APP_DIR/.app.pid"
LOG_FILE="$APP_DIR/.app.log"
if [ -f "$PID_FILE" ]; then
PID=$(cat "$PID_FILE")
if kill -0 "$PID" 2>/dev/null; then
echo "AI Job Application server is already running (PID: $PID)."
echo "Access it at http://localhost:3000"
exit 0
else
rm -f "$PID_FILE"
fi
fi
echo "Starting AI Job Application server..."
cd "$APP_DIR" || exit 1
nohup npm run dev > "$LOG_FILE" 2>&1 &
SERVER_PID=$!
echo "$SERVER_PID" > "$PID_FILE"
sleep 2
if kill -0 "$SERVER_PID" 2>/dev/null; then
echo "✓ Server successfully started (PID: $SERVER_PID)."
echo "✓ App running at: http://localhost:3000"
echo "✓ Logs: $LOG_FILE"
else
echo "❌ Server failed to start. Check logs at $LOG_FILE"
rm -f "$PID_FILE"
exit 1
fi