#!/usr/bin/env bash

set -euo pipefail

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
HOST="${HOST:-0.0.0.0}"
PORT="${PORT:-5173}"

cd "$ROOT_DIR"

if [[ ! -d node_modules ]]; then
  npm install
fi

exec npm run dev -- --host "$HOST" --port "$PORT"
