Chee Pei Lim
Chee Pei Lim

Reputation: 13

Azure App Service Node.js backend

How do we access the App Settings in the Azure App Service using Azure backend Node.js?

Previously in Azure Mobile Services, we could use:

require('mobileservice-config');

But this is no longer valid.

Upvotes: 0

Views: 229

Answers (1)

Gary Liu
Gary Liu

Reputation: 13918

Here is a thread on MSDN in the same scenario with you, at https://social.msdn.microsoft.com/Forums/azure/en-US/1052696e-f37a-4946-a833-5e3912ac3ab8/nodejs-get-app-settings?forum=azuremobile.

Any settings or connection strings defined in the Azure portal or through environment settings are available on the process.env variable. Many of these are normalized into the mobile app configuration object (exposed through req.azureMobile.configuration), but if you've added any custom settings, use process.env.

E.G.

var appSettings = process.env

Upvotes: 2

Related Questions