mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 10:23:24 +00:00
17 lines
394 B
TypeScript
17 lines
394 B
TypeScript
export function getConfig() {
|
|
let tmdbApiKey = process.env.MOVIE_WEB_TMDB_API_KEY ?? '';
|
|
tmdbApiKey = tmdbApiKey.trim();
|
|
|
|
if (!tmdbApiKey) {
|
|
throw new Error('Missing MOVIE_WEB_TMDB_API_KEY environment variable');
|
|
}
|
|
|
|
let proxyUrl: undefined | string = process.env.MOVIE_WEB_PROXY_URL;
|
|
proxyUrl = !proxyUrl ? undefined : proxyUrl;
|
|
|
|
return {
|
|
tmdbApiKey,
|
|
proxyUrl,
|
|
};
|
|
}
|