#!/usr/bin/env bash set -e cd "$(dirname "$0")/.."/server set -a [ -f .env.local ] && source .env.local set +a if [ "${SKIP_YMT:-0}" = "1" ]; then unset YMT_DB_USER YMT_DB_PASSWORD YMT_DB_HOST YMT_DB_PORT YMT_DB_NAME fi go mod tidy if [ "${BUILD:-0}" = "1" ]; then mkdir -p bin go build -o bin/marketing-data-server ./cmd/server PORT=${PORT:-8077} ./bin/marketing-data-server else go run ./cmd/server fi