Seperate scraper code from index cli file

This commit is contained in:
mrjvs
2023-12-26 17:39:40 +01:00
parent edd08446cf
commit 75d4b9edcb
3 changed files with 70 additions and 54 deletions

View File

@@ -6,7 +6,11 @@ export function getConfig() {
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,
};
}