Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 839 Bytes

File metadata and controls

23 lines (19 loc) · 839 Bytes
ms.topic include
ms.date 10/09/2023

To set environment variables in App Service, you create app settings with the following az webapp config appsettings set command.

MONGO_CONNECTION_STRING='your Mongo DB connection string in single quotes'
MONGO_DB_NAME=restaurants_reviews
MONGO_COLLECTION_NAME=restaurants_reviews

az webapp config appsettings set \
   --resource-group $RESOURCE_GROUP_NAME \
   --name $APP_SERVICE_NAME \
   --settings CONNECTION_STRING=$MONGO_CONNECTION_STRING \
              DB_NAME=$MONGO_DB_NAME  \
              COLLECTION_NAME=$MONGO_COLLECTION_NAME 
  • CONNECTION_STRING: A connection string that starts with "mongodb://".
  • DB_NAME: Use "restaurants_reviews".
  • COLLECTION_NAME: Use "restaurants_reviews".