ForcePilot/run.sh

24 lines
392 B
Bash
Raw Normal View History

2024-07-14 16:42:38 +08:00
#!/bin/bash
# Function to stop the services
stop_services() {
echo "Stopping services..."
pkill -f "npm run server"
pkill -f "flask --app=api run"
exit
}
# Trap signals to stop services
trap stop_services SIGINT SIGTERM
# Start the frontend service
cd web
npm run server &
# Start the backend service
cd ../src
2024-07-16 18:14:49 +08:00
python api.py
2024-07-14 16:42:38 +08:00
# Wait for all background jobs to finish
wait