Environment Vars
TO BE UPDATED
These environment variables reflect the v0.8.3 preview release. They are currently being updated for v1.0.0-preview.
Environment Variables
| Environment Variable | Purpose | Read Only? | Default Value |
|---|---|---|---|
| General Settings | |||
| SWA_CLI_VERSION | CLI version | Yes | |
| SWA_CLI_DEBUG | Enable verbose logs (silly, silent, log, info or error) | log | |
| DEBUG | General purpose environment variable used to enable verbose logs for commong tools | ||
| Emulator Settings | |||
| SWA_CLI_API_LOCATION | Folder containing the source code of the API application | ./api | |
| SWA_CLI_APP_LOCATION | Folder containing the source code of the front-end application | ./ | |
| SWA_CLI_OUTPUT_LOCATION | Folder containing the front-end public files | ./ | |
| SWA_CLI_HOST | Host address to use for the CLI dev server | localhost | |
| SWA_CLI_PORT | Host port to use for the CLI dev server | 4280 | |
| SWA_CLI_API_PORT | API server port to use | 7071 | |
| SWA_CLI_APP_SSL | Use HTTPS to serve the front-end application and API (true or false) | false | |
| SWA_CLI_APP_SSL_KEY | SSL key (.key) to use when enabling HTTPS | ||
| SWA_CLI_APP_SSL_CERT | SSL certificate (.crt) to use when enabling HTTPS | ||
| SWA_CLI_STARTUP_COMMAND | Run a custom shell command or script file at startup | ||
| SWA_CLI_OPEN_BROWSER | Automatically open the CLI dev server in the default browser (true or false) | false | |
| SWA_CLI_DEVSERVER_TIMEOUT | The time to wait (in ms) when connecting to a front-end application's dev server | 30000 | |
| Deploy settings | |||
| SWA_CLI_APP_NAME | Project name | ||
| SWA_CLI_DEPLOYMENT_TOKEN | Secret token used to authenticate with the Static Web Apps | ||
| SWA_CLI_DEPLOY_DRY_RUN | Simulate a deploy process without actually running it (true or false) | false | |
| SWA_CLI_DEPLOY_BINARY_VERSION | Deployment binary version to use | stable | |
| SWA_CLI_DEPLOY_BINARY | Absoluate path to the deploy binary | Yes | |
| SWA_CLI_DEPLOY_ENV | the type of deployment environment where to deploy the project | preview | |
| AZURE_REGION_LOCATION | Azure region where to deploy the project | West US 2 | |
| AZURE_RESOURCE_GROUP | Azure resource group | ||
| AZURE_SUBSCRIPTION_ID | Azure subscription ID | ||
| Runtime settings | |||
| SWA_RUNTIME_CONFIG | Absolute path to staticwebapp.config.json | ||
| SWA_RUNTIME_CONFIG_LOCATION | Folder containing the file staticwebapp.config.json | ||
| SWA_RUNTIME_WORKFLOW_LOCATION | Absolute path to .github/workflows/azure-static-web-apps-xyz.yml | Yes | |
| Azure Identity | |||
| AZURE_CLIENT_ID | Azure Active Directory client ID | ||
| AZURE_CLIENT_SECRET | Azure Active Directory secret | ||
| AZURE_TENANT_ID | Azure Active Directory tenant ID |