#!/bin/bash # Team Chat System - Production Frontend Server # Serves the built React app instead of Vite dev server PROJECT_DIR="/home/OfficeDesk/frontend" BUILD_DIR="$PROJECT_DIR/dist" # Erstelle Build falls nicht vorhanden if [[ ! -d "$BUILD_DIR" ]]; then echo "Building frontend..." cd "$PROJECT_DIR" npm run build fi # Serve die statischen Dateien cd "$BUILD_DIR" echo "Serving production build on port 80..." exec serve -s . -l 80