@code-review-leaderboard/azure
Setting up your environment
Install the SAM CLI
Create a new file events/secret-event.json
and copy/paste in the contents of test-event.json
. Then replace the "body"
value with a JSON formatted config as a string.
For example:
{
"body": "{\"azure\":{\"baseUrl\":\"https://dev.azure.com/MyOrg\",\"personalAccessToken\":\"abc123\"}}",
...
}
}
Running locally
-
Install dependencies:
yarn
-
Compile TS to JS
yarn build
-
Build Lambda
sam build
-
Invoke Lambda locally and pass in your secret-event
sam local invoke --event=events/secret-event.json
Debugging locally
-
Open this project in Visual Studio Code
-
Install dependencies:
yarn
-
Compile TS to JS
yarn build
-
(optional) add breakpoints to TS/JS files
-
Press
F5
to run theAzureFunction
launch task, which will build and invoke the Lambda in debug mode