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