learn-request-queue/src/config.ts

30 lines
878 B
TypeScript
Raw Normal View History

2020-06-24 21:34:53 +00:00
if (!process.env.PORT) {
console.log("Missing environment variable PORT");
process.exit(1);
}
export const port: number = parseInt(process.env.PORT as string, 10);
2020-07-04 18:29:07 +00:00
2020-07-05 18:46:41 +00:00
if (!process.env.URL_PREFIX) {
console.log("Missing environment variable URL_PREFIX");
process.exit(1);
}
export const urlPrefix: string = process.env.URL_PREFIX;
if (!process.env.TWITCH_CLIENTID) {
console.log("Missing environment variable TWITCH_CLIENTID");
process.exit(1);
}
export const twitchClientId: string = process.env.TWITCH_CLIENTID;
2020-07-05 02:04:21 +00:00
if (!process.env.TWITCH_SECRET) {
console.log("Missing environment variable TWITCH_SECRET");
process.exit(1);
}
export const twitchSecret: string = process.env.TWITCH_SECRET;
2020-07-04 18:29:07 +00:00
if (!process.env.SESSION_SECRET) {
console.log("Missing environment variable SESSION_SECRET");
process.exit(1);
}
export const sessionSecret: string = process.env.SESSION_SECRET;