Move environment variables to .env

master
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

@ -7,11 +7,7 @@ services:
- db
volumes:
- .:/home/app
environment:
PGHOST: db
PGDATABASE: postgres
PGUSER: postgres
SESSION_SECRET: REPLACE_THIS_SECRET
env_file: .env
db:
container_name: learn-request-queue-db
image: postgres

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);