Azure 应用服务 Node.js 后端

Azure App Service Node.js backend

我们如何使用 Azure 后端访问 Azure 应用服务中的应用设置 Node.js?

以前在 Azure 移动服务中,我们可以使用:

require('mobileservice-config');

但这不再有效。

https://social.msdn.microsoft.com/Forums/azure/en-US/1052696e-f37a-4946-a833-5e3912ac3ab8/nodejs-get-app-settings?forum=azuremobile 上有一个 MSDN 上的线程与您有相同的场景。

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.

例如

var appSettings = process.env