Skip to content

Commit 2cb0552

Browse files
committed
Added fail safe way of loading config file for prod build kunalkapadia#440
1 parent 0b4fe21 commit 2cb0552

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

config/config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
const Joi = require('joi');
2+
const path = require('path');
23

34
// require and configure dotenv, will load vars in .env in PROCESS.ENV
4-
require('dotenv').config();
5+
require('dotenv').config({ path: path.join(__dirname, '../.env') });
56

67
// define validation for all the env vars
78
const envVarsSchema = Joi.object({

0 commit comments

Comments
 (0)