ph-utils 0.9.7 → 0.9.9
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/server.js +3 -2
- package/package.json +1 -1
package/lib/server.js
CHANGED
@@ -82,15 +82,16 @@ export function parseEnvs() {
|
|
82
82
|
short: "n",
|
83
83
|
},
|
84
84
|
},
|
85
|
+
strict: false,
|
85
86
|
});
|
86
|
-
if (values.NODE_ENV != null) {
|
87
|
+
if (values.NODE_ENV != null && typeof values.NODE_ENV === "string") {
|
87
88
|
nodeEnv = values.NODE_ENV;
|
88
89
|
}
|
89
90
|
else {
|
90
91
|
nodeEnv = "production";
|
91
92
|
}
|
92
93
|
process.env.NODE_ENV = nodeEnv;
|
93
|
-
files.push(`.env.${
|
94
|
+
files.push(`.env.${nodeEnv}`);
|
94
95
|
let envParsed = {};
|
95
96
|
for (let i = 0, len = files.length; i < len; i++) {
|
96
97
|
const file = files[i];
|