Fix LM Studio response payload format compatibility

This commit is contained in:
2026-07-22 17:14:50 -04:00
parent 9ccaec0e7c
commit 5044ccc67b
3 changed files with 16 additions and 18 deletions
+8 -11
View File
@@ -5,24 +5,20 @@ 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
# Clean up stale processes
PIDS=$(pgrep -f "tsx server.ts")
if [ -n "$PIDS" ]; then
kill -9 $PIDS 2>/dev/null
fi
rm -f "$PID_FILE"
echo "Starting AI Job Application server..."
cd "$APP_DIR" || exit 1
nohup npm run dev > "$LOG_FILE" 2>&1 &
nohup npx tsx server.ts > "$LOG_FILE" 2>&1 &
SERVER_PID=$!
echo "$SERVER_PID" > "$PID_FILE"
sleep 2
sleep 3
if kill -0 "$SERVER_PID" 2>/dev/null; then
echo "✓ Server successfully started (PID: $SERVER_PID)."
echo "✓ App running at: http://localhost:3000"
@@ -32,3 +28,4 @@ else
rm -f "$PID_FILE"
exit 1
fi