#!/usr/bin/env bash
set -euo pipefail

ROOT="/opt/rental-system"

if [[ -f "${ROOT}/.env" ]]; then
  set -a
  # shellcheck disable=SC1091
  source "${ROOT}/.env"
  set +a
fi

cd "${ROOT}"
exec /usr/bin/npm run start --workspace @rental/api
