Move environment variables to .env
parent
6322a6db14
commit
2ef965f749
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue