[英]Strong-pm does not run with NODE_ENV=production
I have followed the Setting up a production host & Environment Specific Configuration , and specify the NODE_ENV=production
in while installing the strong-pm. 我遵循了“ 设置生产主机和特定于环境的配置” ,并在安装
NODE_ENV=production
-pm时指定了NODE_ENV=production
。
However, after I deploy the application, I find the application did not load component-config.production.json
, it will still loading component-config.json
. 但是,在部署应用程序后,我发现该应用程序未加载
component-config.production.json
,但仍将加载component-config.json
。
How can I let the application to run in production
environment. 如何让应用程序在
production
环境中运行。
This is how I build and deploy the application: 这就是我构建和部署应用程序的方式:
slc build --npm
slc deploy http://username:password:the-ip-address
strong-pm is a multi-app runtime that you deploy apps to. strong-pm是您将应用程序部署到的多应用程序运行时。 If you want to set the environment for an app, you need to set it for the app, not strong-pm.
如果要为应用程序设置环境,则需要为应用程序而不是strong-pm设置环境。
You will need to run something like slc ctl env-set 1 NODE_ENV=production
to set the NODE_ENV
environment variable for app 1. 您将需要运行类似
slc ctl env-set 1 NODE_ENV=production
来为应用程序1设置NODE_ENV
环境变量。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.