[英]Node.js environment variables on AWS EC2 instance
How can I set the environment variables that I'm using in my Node.js application on AWS EC2?如何设置我在 AWS EC2 上的 Node.js 应用程序中使用的环境变量? I tried to export them inside the instance console but it didn't work.
我试图将它们导出到实例控制台中,但没有奏效。 It's running on an ubuntu server 20.04 btw.(ps my application is coming from a git repository, so there isn't a.env file there).
它在 ubuntu 服务器 20.04 btw 上运行。(ps 我的应用程序来自 git 存储库,因此那里没有 a.env 文件)。
Manual Start:手动启动:
Variable=ThisIsTheValue node index
System D:系统 D:
Environment=Variable=ThisisTheValue
ExecStart=/usr/bin/node /path/to/index.js
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.