【问题标题】:Azure App Service Node.js backendAzure 应用服务 Node.js 后端
【发布时间】:2017-01-16 03:33:08
【问题描述】:

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

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

require('mobileservice-config');

但这不再有效。

【问题讨论】:

  • 嗨,现在有更新吗?对你有帮助吗?

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


【解决方案1】:

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

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

例如

var appSettings = process.env

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-09-19
    • 1970-01-01
    • 1970-01-01
    • 2021-03-19
    • 2022-11-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多