#!/bin/bash
# Linux용 시작 스크립트
cd "$(dirname "$0")"

if ! command -v node >/dev/null 2>&1; then
  echo "[에러] Node.js가 필요합니다. https://nodejs.org/"
  exit 1
fi

echo "▶ http://localhost:4500"
echo "▶ Admin: http://localhost:4500/admin/  (PW: ess9977)"

(sleep 1 && (xdg-open http://localhost:4500 2>/dev/null || true)) &
node scripts/serve.js
