-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
35 lines (29 loc) · 979 Bytes
/
start.bat
File metadata and controls
35 lines (29 loc) · 979 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
@echo off
REM Define ports for services
set FRONTEND_PORT=8080
set GENERATOR_SERVICE_PORT=8081
set VALIDATOR_SERVICE_PORT=8082
REM Define an array of port numbers you want to stop
REM Add your port numbers here
set ports=%FRONTEND_PORT% %GENERATOR_SERVICE_PORT% %VALIDATOR_SERVICE_PORT%
REM Loop through the array and attempt to stop processes on each port
for %%port in (%ports%) do (
echo Stopping processes on port %%port...
for /f "tokens=2" %%pid in ('netstat -aon ^| findstr /r "%%port"') do (
taskkill /f /pid %%pid
)
)
echo All specified ports have been stopped.
REM Start the frontend on port 8080
cd frontend || exit
npm install
start npm start -- --port %FRONTEND_PORT%
cd ..
REM Start Generator Service on port 8081
cd generator || exit
call mvnw spring-boot:run -Dserver.port=%GENERATOR_SERVICE_PORT%
cd ..
REM Start Validator Service on port 8082
cd validator || exit
call mvnw spring-boot:run -Dserver.port=%VALIDATOR_SERVICE_PORT%
cd ..