#!/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"