Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions scripts/run-local.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# NOTE: Install latest versions of Node and NPM: https://nodejs.org/en/download/
# NOTE: Install latest version of func CLI: https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local
# NOTE: Start Azure Storage Emulator https://docs.microsoft.com/en-us/azure/storage/common/storage-use-emulator

$ErrorActionPreference = 'Stop'

Expand All @@ -14,23 +15,23 @@ try {
Start-Process pwsh { -c cd ../web/serverless-microservices-web && npm install && npm run build && copy ../../test/settings.example.js dist/js/settings.js && cd dist && swa start }

# Build and start Trip Archiver Nodejs Function
Start-Process pwsh { -c cd ../nodejs/serverless-microservices-functionapp-triparchiver && npm install && npm run pack && func start --javascript -p 7075 }
Start-Process pwsh { -c cd ../nodejs/serverless-microservices-functionapp-triparchiver && npm install && npm run pack && func start --javascript -p 7075 --cors http://localhost:4280 }

# Start each Function in a new console. Give each one a head start to avoid collisions building shared DLLs
# Build and start Drivers Function
Start-Process pwsh { -c cd ServerlessMicroservices.FunctionApp.Drivers && func start --csharp -p 7071 }
Start-Process pwsh { -c cd ServerlessMicroservices.FunctionApp.Drivers && func start --csharp -p 7071 --cors http://localhost:4280 }

Start-Sleep -Seconds 2
# Build and start Trips Function
Start-Process pwsh { -c cd ServerlessMicroservices.FunctionApp.Trips && func start --csharp -p 7072 }
Start-Process pwsh { -c cd ServerlessMicroservices.FunctionApp.Trips && func start --csharp -p 7072 --cors http://localhost:4280 }

Start-Sleep -Seconds 2
# Build and start Passengers Function
Start-Process pwsh { -c cd ServerlessMicroservices.FunctionApp.Passengers && func start --csharp -p 7073 }
Start-Process pwsh { -c cd ServerlessMicroservices.FunctionApp.Passengers && func start --csharp -p 7073 --cors http://localhost:4280 }

Start-Sleep -Seconds 2
# Build and start Orchestrators Function
Start-Process pwsh { -c cd ServerlessMicroservices.FunctionApp.Orchestrators && func start --csharp -p 7074 }
Start-Process pwsh { -c cd ServerlessMicroservices.FunctionApp.Orchestrators && func start --csharp -p 7074 --cors http://localhost:4280 }

Start-Sleep -Seconds 90
# Open the browser
Expand Down
Loading