#!/bin/bash
# Sale Development Server

echo "🚀 Starting Sale Development Server..."

# Backend
cd /root/sale/backend
echo "📦 Installing backend dependencies..."
go mod download
echo "🔨 Building backend..."
go build -o server ./cmd/server

# Frontend
cd /root/sale/frontend
echo "📦 Installing frontend dependencies..."
npm ci
echo "🔨 Building frontend..."
npm run build

# Run with Docker
cd /root/sale
echo "🐳 Starting with Docker..."
docker-compose up -d

echo "✅ Development server started!"
echo "📍 Frontend: http://localhost:8080"
echo "📍 Backend: http://localhost:8080/api"
