#!/bin/sh set -e case "${1:-web}" in web) echo "Running database migrations..." DATABASE_URL="$DATABASE_URL" npx drizzle-kit migrate echo "Starting TrueRef web app on port ${PORT:-3000}..." exec node build ;; mcp) MCP_PORT="${MCP_PORT:-3001}" echo "Starting TrueRef MCP HTTP server on port ${MCP_PORT}..." exec npx tsx src/mcp/index.ts --transport http --port "$MCP_PORT" ;; *) exec "$@" ;; esac