Skip to content

Commit

Permalink
Make the database url an environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilioImp committed Jan 16, 2020
1 parent c036507 commit 6910d6e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"jwtExpirationTime": "theSpoon_jwtExpirationTime",
"AWS_ACCESS_KEY_ID": "theSpoon_AWS_ACCESS_KEY_ID",
"AWS_SECRET_ACCESS_KEY": "theSpoon_AWS_SECRET_ACCESS_KEY",
"companySecret": "theSpoon_companySecret"
"companySecret": "theSpoon_companySecret",
"sequelize_Database": "theSpoon_sequelize_Database"
}
2 changes: 1 addition & 1 deletion config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"jwtExpirationTime": "",
"AWS_ACCESS_KEY_ID": "",
"AWS_SECRET_ACCESS_KEY": "",
"sequelize_Database": "postgres://vlbganljybqkij:19f31cdd0c3704ba6f463d0236de1e224187121d17811cb950b46c29daa5ace4@ec2-54-246-100-246.eu-west-1.compute.amazonaws.com:5432/d9dfhu5citam1c?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory"
"sequelize_Database": ""
}
2 changes: 1 addition & 1 deletion jest.setup.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
jest.setTimeout(100000); // in milliseconds
jest.setTimeout(1000000); // in milliseconds
4 changes: 4 additions & 0 deletions utils/environmentVariablesCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ module.exports = () => {
console.error('FATAL ERROR: companySecret is not defined');
return false;
}
if (!config.get('sequelize_Database')){
console.error('FATAL ERROR: sequelize_Database is not defined');
return false;
}
else return true;
};

Expand Down

0 comments on commit 6910d6e

Please sign in to comment.