- Added MaterialsList component for managing materials with search, filter, and sort capabilities. - Integrated new material form for adding materials with validation. - Implemented editing and deleting functionalities for materials. - Created a responsive design using CSS for the materials list and forms. - Added health check script to verify server and API status. - Developed a comprehensive functional test suite for API endpoints and application functionality.
29 lines
838 B
Bash
Executable File
29 lines
838 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Quick Frontend Deploy Script with Basic Testing
|
|
# Fast deployment with essential health check
|
|
|
|
echo "🚀 Quick deploying frontend..."
|
|
|
|
# Build, copy, restart in one go
|
|
cd /home/alex/git/tilbudgivern/frontend && npm run build > /dev/null 2>&1 && \
|
|
cd /home/alex/git/tilbudgivern && cp -r frontend/build/* build/ && \
|
|
pm2 restart tilbudgivern-unified > /dev/null 2>&1
|
|
|
|
if [ $? -eq 0 ]; then
|
|
echo "✅ Frontend deployed successfully!"
|
|
|
|
# Quick health check
|
|
sleep 3
|
|
SERVER_RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:4030)
|
|
if [ "$SERVER_RESPONSE" = "200" ]; then
|
|
echo "✅ Health check passed"
|
|
echo "🌐 http://localhost:4030"
|
|
else
|
|
echo "⚠️ Health check failed (HTTP $SERVER_RESPONSE)"
|
|
fi
|
|
else
|
|
echo "❌ Deployment failed"
|
|
exit 1
|
|
fi
|