28 lines
665 B
Bash
28 lines
665 B
Bash
#!/bin/bash
|
|
|
|
echo "🔄 Syncing Next.js static files to Go..."
|
|
|
|
# Check if Next.js build exists
|
|
if [ ! -d "apps/web/out" ]; then
|
|
echo "❌ Next.js build not found. Run 'npm run build:web' first."
|
|
exit 1
|
|
fi
|
|
|
|
# Remove old static files (except .gitkeep if exists)
|
|
echo " - Cleaning old files..."
|
|
rm -rf apps/server-go/static/*
|
|
|
|
# Copy new files
|
|
echo " - Copying files..."
|
|
cp -r apps/web/out/* apps/server-go/static/
|
|
|
|
# Count files
|
|
FILE_COUNT=$(find apps/server-go/static -type f | wc -l)
|
|
|
|
echo "✅ Synced ${FILE_COUNT} files to apps/server-go/static/"
|
|
echo ""
|
|
echo "Next steps:"
|
|
echo " cd apps/server-go && go run main.go"
|
|
echo " Open http://localhost:8080"
|
|
|