#!/bin/bash set -e # Start the Next.js application npm start & # Start the FastAPI backend python main.py & # Wait for any process to exit wait -n # Exit with status of process that exited first exit $?