File tree Expand file tree Collapse file tree 2 files changed +26
-31
lines changed
Expand file tree Collapse file tree 2 files changed +26
-31
lines changed Original file line number Diff line number Diff line change @@ -17,19 +17,19 @@ if "%errorlevel%" neq "0" (
1717)
1818cd ..
1919
20- echo Starting backend...
21- start /B python api/ app.py --port=8000
20+ echo Starting backend in a new terminal ...
21+ start cmd /k " cd api && python app.py --port=8000"
2222if " %errorlevel% " neq " 0" (
2323 echo Failed to start backend
2424 exit /B %errorlevel%
2525)
2626
27- echo Starting frontend...
28- start /B cmd /c " cd App && npm start"
27+ echo Starting frontend in a new terminal ...
28+ start cmd /k " cd App && npm start"
2929if " %errorlevel% " neq " 0" (
3030 echo Failed to start frontend
3131 exit /B %errorlevel%
3232)
3333
3434echo Backend running at http://127.0.0.1:8000
35- echo Frontend running at http://localhost:3000
35+ echo Frontend running at http://localhost:3000
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- echo " "
4- echo " Restoring frontend npm packages"
5- echo " "
6- cd frontend
7- npm install
8- if [ $? -ne 0 ]; then
9- echo " Failed to restore frontend npm packages"
10- exit $?
11- fi
3+ set -e
124
13- echo " "
14- echo " Building frontend"
15- echo " "
16- npm run build
17- if [ $? -ne 0 ]; then
18- echo " Failed to build frontend"
19- exit $?
20- fi
5+ # Restoring backend Python packages
6+ echo " Restoring backend Python packages..."
7+ cd api
8+ python -m pip install -r requirements.txt || { echo " Failed to restore backend Python packages" ; exit 1; }
9+ cd ..
2110
11+ # Restoring frontend npm packages
12+ echo " Restoring frontend npm packages..."
13+ cd App
14+ npm install --force || { echo " Failed to restore frontend npm packages" ; exit 1; }
2215cd ..
23- . ./scripts/loadenv.sh
2416
25- echo " "
26- echo " Starting backend"
27- echo " "
28- ./.venv/bin/python -m quart run --port=50505 --host=127.0.0.1 --reload
29- if [ $? -ne 0 ]; then
30- echo " Failed to start backend"
31- exit $?
32- fi
17+ # Starting backend in the background
18+ echo " Starting backend..."
19+ (cd api && python app.py --port=8000 & ) || { echo " Failed to start backend" ; exit 1; }
20+
21+ # Starting frontend in the background
22+ echo " Starting frontend..."
23+ (cd App && npm start & ) || { echo " Failed to start frontend" ; exit 1; }
24+
25+ # Display running services
26+ echo " Backend running at http://127.0.0.1:8000"
27+ echo " Frontend running at http://localhost:3000"
You can’t perform that action at this time.
0 commit comments