Skip to content

Commit f23afd3

Browse files
committed
fix: move dotenvx configuration to non-production environments in index.ts and update package.json dependencies
1 parent 382db6a commit f23afd3

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

package-lock.json

Lines changed: 22 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"podverse"
3333
],
3434
"dependencies": {
35-
"@dotenvx/dotenvx": "^1.6.4",
3635
"body-parser": "^1.20.2",
3736
"cookie-parser": "^1.4.7",
3837
"express": "^4.19.2",
@@ -51,6 +50,7 @@
5150
"uuid": "^11.1.0"
5251
},
5352
"devDependencies": {
53+
"@dotenvx/dotenvx": "^1.6.4",
5454
"@eslint/config-array": "^0.18.0",
5555
"@eslint/eslintrc": "^3.1.0",
5656
"@eslint/js": "^9.8.0",

src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import './module-alias-config';
2-
require('@dotenvx/dotenvx').config();
2+
3+
if (process.env.NODE_ENV !== 'production') {
4+
require('@dotenvx/dotenvx').config();
5+
}
36

47
import { logger } from 'podverse-helpers';
58
import { AppDataSourceRead, AppDataSourceReadWrite } from "podverse-orm";

0 commit comments

Comments
 (0)