Dépôt contenant les fichiers annexes nécessaires pour le bon fonctionnement de l'application AssistDB
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
AssistDB_AdditionalFiles/AssistBDD.ps1

26 lines
1001 B

$backendPath = $PSScriptRoot + "\..\AssistDB_V2_Back"
$frontendPath = $PSScriptRoot + "\..\AssistDB_V2_Front"
Start-Job -Name Backend -Args $backendPath { param($backendPath) Set-Location $backendPath; git pull; mvn spring-boot:run
}
Start-Job -Name Frontend -Args $frontendPath{ param($frontendPath) Set-Location $frontendPath; git pull; npm install; ng serve }
Start-Process "http://localhost:9002/"
$text = 'Tapez "stop" pour stopper les applications ou "log" pour afficher les logs: '
$continue=1
while ($continue -eq 1){
$FromInput = Read-Host $text
if ( $FromInput -like 'stop' ) {
$continue=0;
}
elseif ( $FromInput -like 'log' ) {
Write-Host "### - Back : "
Get-Job -Name Backend | Receive-Job
Write-Host "### - Front : "
Get-Job -Name Frontend | Receive-Job
}
}
if($FromInput -eq 'stop'){
Get-Job -Name Backend | Stop-Job
Get-Job -Name Backend | Remove-Job
Get-Job -Name Frontend | Stop-Job
Get-Job -Name Frontend | Remove-Job
}