Skip to content
This repository has been archived by the owner on Nov 21, 2020. It is now read-only.

Commit

Permalink
fix(jwt): checked JWT_TOKEN_SECRET config on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
batamar committed Jan 28, 2020
1 parent a13a704 commit 30daf11
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ initRedis();
// load environment variables
dotenv.config();

const { NODE_ENV } = process.env;
const { NODE_ENV, JWT_TOKEN_SECRET } = process.env;

if (!JWT_TOKEN_SECRET) {
throw new Error('Please configure JWT_TOKEN_SECRET environment variable');
}

const MAIN_APP_DOMAIN = getEnv({ name: 'MAIN_APP_DOMAIN', defaultValue: '' });
const WIDGETS_DOMAIN = getEnv({ name: 'WIDGETS_DOMAIN', defaultValue: '' });
const INTEGRATIONS_API_DOMAIN = getEnv({ name: 'INTEGRATIONS_API_DOMAIN', defaultValue: '' });
Expand Down

0 comments on commit 30daf11

Please sign in to comment.