Refactored dev-cli

This commit is contained in:
mrjvs
2023-12-26 17:00:35 +01:00
parent af00bcf7c1
commit feddf9c215
8 changed files with 463 additions and 430 deletions

12
src/dev-cli/config.ts Normal file
View File

@@ -0,0 +1,12 @@
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');
}
return {
tmdbApiKey,
};
}