Skip to content

Commit

Permalink
Added fail safe way of loading config file for prod build kunalkapadi…
Browse files Browse the repository at this point in the history
  • Loading branch information
gianpaj committed Jan 12, 2020
1 parent 0b4fe21 commit 2cb0552
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const Joi = require('joi');
const path = require('path');

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

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

0 comments on commit 2cb0552

Please sign in to comment.