#!/bin/bash

echo "Starting Wolna Głowa Next.js Application..."

# Check if .next directory exists
if [ ! -d ".next" ]; then
    echo "ERROR: .next directory not found. Building the application..."
    npm run build:production
fi

# Start the application
node app.js 