From e0ae0e20b28ed55c0da039588760a1d1a65a25ec Mon Sep 17 00:00:00 2001 From: Bernardo Guerreiro Date: Tue, 23 Jan 2024 16:47:32 +0000 Subject: [PATCH] refactor: update constants.js --- constants.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/constants.js b/constants.js index 5470c28..a91ca63 100644 --- a/constants.js +++ b/constants.js @@ -1,13 +1,9 @@ -const SERVICE_NAME = "movies-service"; +const SERVICE_NAME = "movie-service"; const REGION = process.env.DEPLOYMENT_REGION || "eu-west-2"; -if(!process.env.DDB_TABLE_NAME || (!process.env.SERVICE_NAME && !process.env.ENVIRONMENT)) { - throw new Error('TABLE_NAME environment variable not set'); -} - -const TABLE_NAME = process.env.DDB_TABLE_NAME || `${SERVICE_NAME}-${ENVIRONMENT}`; - module.exports = { + SERVICE_NAME: 'movie-service', REGION, - TABLE_NAME, + TABLE_NAME: process.env.DDB_TABLE_NAME || `${SERVICE_NAME}-${ENVIRONMENT}`, +// TABLE_NAME, } \ No newline at end of file