[英]Environment Variables on Plesk Nodejs
I have hosted my node api on Plesk.我在 Plesk 上托管了我的节点 api。 But i cant find anywhere to add my env variables so that my api could work.但是我找不到任何地方可以添加我的环境变量,这样我的 api 就可以工作了。
As you can see in the below image.如下图所示。 custom variables option is below Application Startup File
but in my case its not there.自定义变量选项在Application Startup File
下面,但在我的例子中它不在那里。
(Plesk for Linux only) Custom environment variables - Here you can see a list of custom environment variables you have set for your application (if any). (仅限 Plesk for Linux)自定义环境变量 - 在这里您可以看到您为应用程序设置的自定义环境变量列表(如果有)。 Click “[specify]” to add or remove environment variables for your application:单击“[指定]”为您的应用程序添加或删除环境变量:
If you running Plesk on Linux env then the above option is available else you need to follow the below steps.如果您在 Linux env 上运行 Plesk,则以上选项可用,否则您需要按照以下步骤操作。
You need to use .env
outside the application folder and create a custom script and pass these .env
and send them as arguments when you run the node script.您需要在应用程序文件夹外使用.env
并创建自定义脚本并传递这些.env
并在运行节点脚本时将它们作为 arguments 发送。 Check this link if it helps. 检查此链接是否有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.