From 81acce4cde9367b9fa40f2054ccab5e1e287aeb3 Mon Sep 17 00:00:00 2001 From: floxx2112 Date: Thu, 6 Apr 2023 15:59:14 +0200 Subject: [PATCH] commited --- Scripts/AssistBDDdup.ps1 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Scripts/AssistBDDdup.ps1 diff --git a/Scripts/AssistBDDdup.ps1 b/Scripts/AssistBDDdup.ps1 new file mode 100644 index 0000000..83f5329 --- /dev/null +++ b/Scripts/AssistBDDdup.ps1 @@ -0,0 +1,27 @@ +Vraiment marche stp +$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; 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 +}