-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
32 lines (24 loc) · 806 Bytes
/
Copy pathstart.sh
File metadata and controls
32 lines (24 loc) · 806 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
#!/bin/bash
# This script automates the startup process for both backend and frontend services.
# It first activates the virtual environment and starts the backend server,
# then it navigates to the frontend directory and starts the frontend server.
# Finally, it waits for all processes to finish.
# Usage:
# 1. Make the script executable: chmod +x start.sh
# 2. Run the script: ./start.sh
# Start backend
echo "Starting backend..."
# Navigate to the backend directory
cd backend
# Activate the virtual environment
source venv/bin/activate
# Start the backend server using uvicorn
uvicorn main:app --reload &
# Start frontend
echo "Starting frontend..."
# Navigate to the frontend directory
cd ../frontend
# Start the frontend server using npm
npm run dev &
# Awaiting for processes to finish
wait