Azure Function App

March 6, 2024 ยท View on GitHub

The Azure Static Web App service includes an auto-deployed Function API that is managed by convention, as described in the service documentation.

Local development

The API can be run locally following these instructions or by running ./scripts/server --api.

To set appropriate configuration values for the Function app, copy the local.settings.sample.json file to local.settings.json. This settings file is .gitignored and will contain sensitive secrets, so take appropriate precautions.

Development Configuration

The local.settings.json file has the following keys in the Values section:

KeyKeyVault KeyPurpose
NotificationHookURL to send Teams notification on new Account Request
AuthAdminUrlURL to the PC ID admin page which contains the signup table. Used in the Teams notification message.
SignupUrlURL to POST new user content to on submission
SignupTokenpc-id--request-auth-tokenBearer token required to make the above POST request

Production

These values, or their production equivalents, are configured in the Static Web App App Configuration section.