-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_fullstack.sh
More file actions
executable file
·31 lines (24 loc) · 855 Bytes
/
Copy pathrun_fullstack.sh
File metadata and controls
executable file
·31 lines (24 loc) · 855 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
#!/bin/bash
# Function to handle cleanup on exit
cleanup() {
echo "Stopping servers..."
kill $(jobs -p)
exit
}
trap cleanup SIGINT SIGTERM
echo "Starting FastAPI Backend..."
# Run backend in background using the local venv
"/media/alex/20B29C68B29C43E6/Users/ankit/Desktop/python/Machine Learning/EDA, cleaning, extraction/Practice/.venv/bin/python" -m uvicorn api.index:app --reload --port 8000 &
BACKEND_PID=$!
# Start Frontend in background
echo "Starting Frontend..."
# Setup for Node 18 compatibility already handled in package.json/vite.config
# Frontend is now in root
npm run dev &
FRONTEND_PID=$!
echo "Servers are running!"
echo "Backend: http://localhost:8000"
echo "Frontend: http://localhost:5173"
echo "Press Ctrl+C to stop both."
wait $BACKEND_PID $FRONTEND_PID
# to run the frontend an dbackend>>> bash run_fullstack.sh