#!/bin/bash
# Start the AASD (API Attack Surface Discovery) server from dist/
# Version: 2026-04.1

set -e

cd "$(dirname "$0")"

echo "================================================"
echo "  AASD — API Attack Surface Discovery"
echo "  Version: 2026-04.1"
echo "  GITEX 2026 — sechpoint.app"
echo "================================================"
echo ""

# Ensure required directories exist
mkdir -p reports logs

# Run the server
./aasd 2>&1 | tee logs/server-$(date +%Y%m%d-%H%M%S).log
