Skip to content

Commit

Permalink
fix to comfig
Browse files Browse the repository at this point in the history
  • Loading branch information
ushliypakostnik committed Sep 23, 2019
1 parent 299979c commit ad73c06
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import crypto from 'crypto';
import PASS from './pass';
import MESSAGES from './messages';

require('dotenv').config();

const env = process.env.NODE_ENV;

if (env === 'production') {
require('dotenv').config();
}

const random = Number(process.env.RANDOM_BYTES) || PASS.RANDOM_BYTES;
const secret = crypto.randomBytes(random).toString('hex');

Expand Down

0 comments on commit ad73c06

Please sign in to comment.