简体   繁体   English

什么是process.env

[英]what is process.env

Where can I get the documentation for process.env ? 在哪里可以获取process.env的文档?

Wat all the variables I can access in that env Wat所有我可以在该环境中访问的变量

For example, what does process.env.port || 1137 例如, process.env.port || 1137是什么? process.env.port || 1137 do? process.env.port || 1137吗?

I understand process.env is environment and we are looking for port in it. 我了解process.env是环境,我们正在其中寻找港口。 what does || ||是什么 mean? 意思?

This is a common notation in JavaScript that allows for default values, typically for user provided options, if none are given. 这是JavaScript中的一种常见表示法,它允许使用默认值,如果没有提供默认值,通常是用户提供的选项。

If process.env.port has a value, it is used. 如果process.env.port具有值,则使用它。 If it doesn't have a value, then 1137 will be used. 如果没有值,则将使用1137。

if process.env.port exist it will use it otherwise it will use 1137. || 如果process.env.port存在,它将以其它方式使用它,它会使用1137 || it is or operator. 是还是运算符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM