- Added package.json for project dependencies and scripts - Created setup_mariadb.sql for database setup and user creation - Documented project development plan in taskfile.txt - Implemented test_setup.sh for system requirements and project structure checks - Configured systemd service files for backend and frontend applications - Added ubu-deployment-commands.sh for deployment instructions on Ubu server
60 lines
1.7 KiB
Bash
Executable File
60 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Test script for Tilbudgivern application
|
|
|
|
echo "🧪 Testing Tilbudgivern Application"
|
|
echo "=================================="
|
|
|
|
echo "📋 System Requirements Check:"
|
|
echo "- Node.js version:"
|
|
node --version
|
|
|
|
echo "- NPM version:"
|
|
npm --version
|
|
|
|
echo "- MariaDB connection test:"
|
|
mysql --version 2>/dev/null || echo "MariaDB/MySQL client not found - install with: sudo apt install mariadb-client"
|
|
|
|
echo ""
|
|
echo "📁 Project Structure:"
|
|
ls -la /home/alex/git/tilbudgivern/
|
|
|
|
echo ""
|
|
echo "🏗️ Backend Dependencies:"
|
|
cd /home/alex/git/tilbudgivern/backend
|
|
npm list --depth=0 | grep mysql2 || echo "❌ MySQL2 not installed"
|
|
|
|
echo ""
|
|
echo "🎨 Frontend Build Status:"
|
|
if [ -d "/home/alex/git/tilbudgivern/frontend/build" ]; then
|
|
echo "✅ Frontend build directory exists"
|
|
ls -la /home/alex/git/tilbudgivern/frontend/build/
|
|
else
|
|
echo "❌ Frontend build directory missing"
|
|
fi
|
|
|
|
echo ""
|
|
echo "⚙️ Configuration Files:"
|
|
echo "Backend .env file:"
|
|
if [ -f "/home/alex/git/tilbudgivern/backend/.env" ]; then
|
|
echo "✅ .env file exists"
|
|
echo "Database configuration:"
|
|
grep "DB_" /home/alex/git/tilbudgivern/backend/.env
|
|
else
|
|
echo "❌ .env file missing"
|
|
fi
|
|
|
|
echo ""
|
|
echo "📝 Next Steps:"
|
|
echo "1. Configure MariaDB database:"
|
|
echo " sudo mysql -u root -p < /home/alex/git/tilbudgivern/setup_mariadb.sql"
|
|
echo ""
|
|
echo "2. Update database password in .env file:"
|
|
echo " nano /home/alex/git/tilbudgivern/backend/.env"
|
|
echo ""
|
|
echo "3. Start backend server:"
|
|
echo " cd /home/alex/git/tilbudgivern/backend && npm start"
|
|
echo ""
|
|
echo "4. Serve frontend (in another terminal):"
|
|
echo " cd /home/alex/git/tilbudgivern/frontend && npx serve -s build -l 3000"
|