Move environment variables to .env

This commit is contained in:
Dessa Simpson 2020-07-04 19:04:21 -07:00
parent 6322a6db14
commit 2ef965f749
2 changed files with 7 additions and 5 deletions

View file

@ -4,6 +4,12 @@ if (!process.env.PORT) {
}
export const port: number = parseInt(process.env.PORT as string, 10);
if (!process.env.TWITCH_SECRET) {
console.log("Missing environment variable TWITCH_SECRET");
process.exit(1);
}
export const twitchSecret: string = process.env.TWITCH_SECRET;
if (!process.env.SESSION_SECRET) {
console.log("Missing environment variable SESSION_SECRET");
process.exit(1);