[英]How to pass Azure AppSettings to NodeJS App running on Linux AppService
I am running a nestJS app on an Azure Linux AppService.我在 Azure Linux AppService 上运行 nestJS 应用程序。 I have added Application Settings within the appService, but I can't seem to get the app to pull through the value.
我在 appService 中添加了应用程序设置,但我似乎无法让该应用程序获取该值。
one of the appSettings is process.env.DB_Host
with value mysqlserveraddress
but when the app starts it says it cannot connect to process.env.DB_Host
rather than the mysqlserveraddress
其中一个 appSettings 是
process.env.DB_Host
,值为mysqlserveraddress
但是当应用程序启动时,它说它无法连接到process.env.DB_Host
而不是mysqlserveraddress
How do I pass these values in?我如何传递这些值?
Thanks谢谢
Tommy汤米
I am using below code to check the Environment Variable
in my Linux App Service.我正在使用以下代码检查我的 Linux 应用服务中的
Environment Variable
。
I can see the entire Environment variables
which is available in my Linux App Service.我可以看到我的 Linux 应用服务中可用的整个
Environment variables
。
And same I had added my App Settings
in my Linux App Service.同样,我在我的 Linux 应用服务中添加了我的
App Settings
。
Now I am specifically get the AppSettings
Value in App.js
and deployed in App Serive
.现在我专门在
App.js
中获取AppSettings
Value 并部署在App Serive
中。
Now, I can get the Environments variable
.现在,我可以获得
Environments variable
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.