-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_simulator.sh
More file actions
executable file
·36 lines (29 loc) · 844 Bytes
/
run_simulator.sh
File metadata and controls
executable file
·36 lines (29 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Run the assembler0 simulator with both backend and frontend
# Function to cleanup background processes on exit
cleanup() {
echo "Shutting down simulator..."
kill $BACKEND_PID $FRONTEND_PID 2>/dev/null
exit
}
# Set up trap to cleanup on script exit
trap cleanup EXIT INT TERM
# Start the backend server
echo "Starting backend server..."
cd packages/assembler0-simulator
uv run python src/assembler0_simulator/backend/main.py &
BACKEND_PID=$!
# Wait a moment for backend to start
sleep 2
# Start the frontend dev server
echo "Starting frontend dev server..."
cd src/assembler0_simulator/frontend
npm run dev &
FRONTEND_PID=$!
echo "Simulator running:"
echo " Backend: http://localhost:1337"
echo " Frontend: http://localhost:5173"
echo ""
echo "Press Ctrl+C to stop both servers"
# Wait for both processes
wait