告警参数变更

This commit is contained in:
tiger_zhou 2023-10-17 11:09:53 +08:00
parent 157398ac9b
commit 26b0ba9b3a

View File

@ -1,11 +1,12 @@
const DotEnv = require('dotenv')
const parsedEnv = DotEnv.config({ path: `.env.${process.env.NODE_ENV1123}` }).parsed
module.exports = function () {
console.log(process.env.NODE_ENV1123)
console.log(process.env.NODE_ENV)
console.log(process.env)
console.log(parsedEnv);
let script = process.env.npm_lifecycle_script;
script = script.substring(script.indexOf("NODE_ENV=") + "NODE_ENV=".length);
let name = script.substring(0,script.indexOf("&"))
console.log(name);
name = ".env." + name
let parsedEnv = DotEnv.config({ path: name }).parsed
return parsedEnv
}