#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."/server
go mod tidy
if [ "${BUILD:-0}" = "1" ]; then
mkdir -p bin
go build -o bin/marketing-data-server ./cmd/server
./bin/marketing-data-server
else
go run ./cmd/server
fi