@@ -6,37 +6,32 @@ $ErrorActionPreference = 'Stop'
66
77try {
88
9- # Start the storage emulator
10- & " C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" " start"
11-
129 # cd /dotnet
1310 Push-Location ( Join-Path $PSScriptRoot ../ dotnet )
1411
15- # Build and host SPA at http://127.0.0.1:4280/
12+ Write-Host ' Install and start the storage emulator...'
13+ # If this fails with error EADDRINUSE it is because Visual Studio has already started azurite (which is fine)
14+ Start-Process pwsh { - c md __azurite__ - Force && npm install - g azurite && azurite -- silent - l __azurite__ }
15+
16+ Write-Host ' Build and host SPA...'
1617 Start-Process pwsh { - c cd ../ web/ serverless- microservices- web && npm install && copy ../ ../ test/ settings.example.js ./ public/ js/ settings.js && npm run serve -- -- port 4280 }
1718
18- # Build and start Trip Archiver Nodejs Function
19+ Write-Host ' Build and start Trip Archiver Nodejs Function... '
1920 Start-Process pwsh { - c cd ../ nodejs/ serverless- microservices- functionapp- triparchiver && npm install && npm run pack && func start -- javascript - p 7075 -- cors http:// localhost:4280 }
2021
21- # Start each Function in a new console. Give each one a head start to avoid collisions building shared DLLs
22- # Build and start Drivers Function
22+ Write-Host ' Build and start Drivers Function...'
2323 Start-Process pwsh { - c cd ServerlessMicroservices.FunctionApp.Drivers && func start -- csharp - p 7071 -- cors http:// localhost:4280 }
2424
25- Start-Sleep - Seconds 2
26- # Build and start Trips Function
25+ Write-Host ' Build and start Trips Function...'
2726 Start-Process pwsh { - c cd ServerlessMicroservices.FunctionApp.Trips && func start -- csharp - p 7072 -- cors http:// localhost:4280 }
2827
29- Start-Sleep - Seconds 2
30- # Build and start Passengers Function
28+ Write-Host ' Build and start Passengers Function...'
3129 Start-Process pwsh { - c cd ServerlessMicroservices.FunctionApp.Passengers && func start -- csharp - p 7073 -- cors http:// localhost:4280 }
3230
33- Start-Sleep - Seconds 2
34- # Build and start Orchestrators Function
31+ Write-Host ' Build and start Orchestrators Function...'
3532 Start-Process pwsh { - c cd ServerlessMicroservices.FunctionApp.Orchestrators && func start -- csharp - p 7074 -- cors http:// localhost:4280 }
3633
37- Start-Sleep - Seconds 90
38- # Open the browser
39- start ' http://localhost:4280/'
34+ Write-Host ' When all builds have finished, open browser at http://localhost:4280/'
4035
4136}
4237finally {
0 commit comments