Files
gotail/build.sh
Luiz Costa 3a5cbe12ef feat: initialize web tail pro application with frontend and backend
- Add frontend React application with log viewing components
- Implement backend Go server for log tailing and SSE streaming
- Include build scripts for both frontend and backend
- Set up basic authentication and file handling
- Add styling and log formatting capabilities
2025-11-18 08:27:21 -03:00

36 lines
976 B
Bash

#!/bin/bash
echo "🚀 Iniciando o processo de build..."
# Passo 1: Build do Frontend (React)
echo "📦 Instalando dependências do frontend..."
cd frontend
npm install
echo "🔨 Construindo o frontend para produção..."
npm run build
if [ $? -ne 0 ]; then
echo "❌ Falha no build do frontend. Abortando."
exit 1
fi
cd ..
# Passo 2: Build do Backend (Go)
echo "🔨 Compilando o backend com arquivos embedados..."
go build -o web-tail-pro ./backend/main.go
if [ $? -ne 0 ]; then
echo "❌ Falha na compilação do backend. Abortando."
exit 1
fi
echo "✅ Build concluído com sucesso!"
echo "➡️ Execute o binário gerado:"
echo " ./web-tail-pro [opções] backend/logs/app.log backend/logs/access.log backend/logs/json.log"
echo ""
echo "Exemplos:"
echo " ./web-tail-pro -port :9090 -password 's3nh4' backend/logs/*.log"
echo " ./web-tail-pro -password 's3nh4' backend/logs/app.log"
echo " ./web-tail-pro -port 1234 backend/logs/*.log"