44 lines
1.7 KiB
TypeScript
44 lines
1.7 KiB
TypeScript
|
|
||
|
// if (!process.env.PATREON_CLIENT_ID) throw new Error("PATREON_CLIENT_ID was missing from env");
|
||
|
// if (!process.env.PATREON_CLIENT_SECRET) throw new Error('Missing PATREON_CLIENT_SECRET env var');
|
||
|
if (!process.env.NEXT_PUBLIC_API_DOMAIN) throw new Error('Missing NEXT_PUBLIC_API_DOMAIN env var');
|
||
|
if (!process.env.NEXT_PUBLIC_WEBSITE_DOMAIN) throw new Error('Missing NEXT_PUBLIC_WEBSITE_DOMAIN env var');
|
||
|
if (!process.env.SUPERTOKENS_API_KEYS) throw new Error('SUPERTOKENS_API_KEYS was undefined in env');
|
||
|
if (!process.env.SUPERTOKENS_URL) throw new Error('SUPERTOKENS_URL missing in env');
|
||
|
if (!process.env.PATREON_CLIENT_ID) throw new Error('PATREON_CLIENT_ID missing in env');
|
||
|
if (!process.env.PATREON_CLIENT_SECRET) throw new Error('PATREON_CLIENT_SECRET missing in env');
|
||
|
|
||
|
const patreonClientId = process.env.PATREON_CLIENT_ID!
|
||
|
const patreonClientSecret = process.env.PATREON_CLIENT_SECRET!
|
||
|
const apiDomain = process.env.NEXT_PUBLIC_API_DOMAIN!
|
||
|
const websiteDomain = process.env.NEXT_PUBLIC_WEBSITE_DOMAIN!
|
||
|
const logtoCookieSecret = process.env.LOGTO_COOKIE_SECRET!
|
||
|
const logtoAppId = process.env.LOGTO_APP_ID!
|
||
|
const logtoAppSecret = process.env.LOGTO_APP_SECRET!
|
||
|
const supertokensApiKeys = process.env.SUPERTOKENS_API_KEYS!
|
||
|
const supertokensUrl = process.env.SUPERTOKENS_URL!
|
||
|
|
||
|
export interface Config {
|
||
|
patreonClientId: string;
|
||
|
patreonClientSecret: string;
|
||
|
apiDomain: string;
|
||
|
websiteDomain: string;
|
||
|
logtoCookieSecret: string;
|
||
|
logtoAppSecret: string;
|
||
|
logtoAppId: string;
|
||
|
supertokensApiKeys: string;
|
||
|
supertokensUrl: string;
|
||
|
}
|
||
|
|
||
|
export const configs: Config = {
|
||
|
patreonClientId,
|
||
|
patreonClientSecret,
|
||
|
apiDomain,
|
||
|
websiteDomain,
|
||
|
logtoCookieSecret,
|
||
|
logtoAppSecret,
|
||
|
logtoAppId,
|
||
|
supertokensApiKeys,
|
||
|
supertokensUrl,
|
||
|
}
|