#!/bin/bash
# Supervisor script that keeps the chat service alive
while true; do
  echo "[supervisor] Starting chat service..."
  cd /home/z/my-project/mini-services/chat-service
  bun index.ts
  EXIT_CODE=$?
  echo "[supervisor] Chat service exited with code $EXIT_CODE, restarting in 2s..."
  sleep 2
done
