编程 API
¥Programmatic APIs
以下两个函数允许你直接与 .env
文件交互:
¥There following two functions allow you to directly interact with .env
files:
-
process.loadEnvFile
加载.env
文件并将其变量填充到process.env
中¥
process.loadEnvFile
loads an.env
file and populatesprocess.env
with its variables -
util.parseEnv
解析.env
文件的行内容并将其值返回到对象中¥
util.parseEnv
parses the row content of an.env
file and returns its value in an object