Azure App Service Node.js后端

时间:2016-09-08 09:09:01

标签: node.js azure azure-app-service-envrmnt azure-app-api

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

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

require('mobileservice-config');

但这不再有效。

1 个答案:

答案 0 :(得分:1)

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

  

process.env变量中提供了Azure门户中或通过环境设置定义的任何设置或连接字符串。其中许多都已标准化为移动应用配置对象(通过req.azureMobile.configuration公开),但如果您添加了任何自定义设置,请使用process.env

E.G。

var appSettings = process.env