Skip to main content

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 VariablePurposeRead Only?Default Value
General Settings
SWA_CLI_VERSIONCLI versionYes
SWA_CLI_DEBUGEnable verbose logs (silly, silent, log, info or error)log
DEBUGGeneral purpose environment variable used to enable verbose logs for commong tools
Emulator Settings
SWA_CLI_API_LOCATIONFolder containing the source code of the API application./api
SWA_CLI_APP_LOCATIONFolder containing the source code of the front-end application./
SWA_CLI_OUTPUT_LOCATIONFolder containing the front-end public files./
SWA_CLI_HOSTHost address to use for the CLI dev serverlocalhost
SWA_CLI_PORTHost port to use for the CLI dev server4280
SWA_CLI_API_PORTAPI server port to use7071
SWA_CLI_APP_SSLUse HTTPS to serve the front-end application and API (true or false)false
SWA_CLI_APP_SSL_KEYSSL key (.key) to use when enabling HTTPS
SWA_CLI_APP_SSL_CERTSSL certificate (.crt) to use when enabling HTTPS
SWA_CLI_STARTUP_COMMANDRun a custom shell command or script file at startup
SWA_CLI_OPEN_BROWSERAutomatically open the CLI dev server in the default browser (true or false)false
SWA_CLI_DEVSERVER_TIMEOUTThe time to wait (in ms) when connecting to a front-end application's dev server30000
Deploy settings
SWA_CLI_APP_NAMEProject name
SWA_CLI_DEPLOYMENT_TOKENSecret token used to authenticate with the Static Web Apps
SWA_CLI_DEPLOY_DRY_RUNSimulate a deploy process without actually running it (true or false)false
SWA_CLI_DEPLOY_BINARY_VERSIONDeployment binary version to usestable
SWA_CLI_DEPLOY_BINARYAbsoluate path to the deploy binaryYes
SWA_CLI_DEPLOY_ENVthe type of deployment environment where to deploy the projectpreview
AZURE_REGION_LOCATIONAzure region where to deploy the projectWest US 2
AZURE_RESOURCE_GROUPAzure resource group
AZURE_SUBSCRIPTION_IDAzure subscription ID
Runtime settings
SWA_RUNTIME_CONFIGAbsolute path to staticwebapp.config.json
SWA_RUNTIME_CONFIG_LOCATIONFolder containing the file staticwebapp.config.json
SWA_RUNTIME_WORKFLOW_LOCATIONAbsolute path to .github/workflows/azure-static-web-apps-xyz.ymlYes
Azure Identity
AZURE_CLIENT_IDAzure Active Directory client ID
AZURE_CLIENT_SECRETAzure Active Directory secret
AZURE_TENANT_IDAzure Active Directory tenant ID