Skip to content

Commit

Permalink
add dotenv
Browse files Browse the repository at this point in the history
  • Loading branch information
sevelinCa committed May 17, 2024
1 parent 5d30660 commit 59d3c01
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT: 5000
MODE: development
DATABASE_DEVELOPMENT_URL: postgres://ecommerce_crafters:SbURswsoV8KbisVverlrMFQ8SGusdp8a@dpg-cp0un1nsc6pc7382j630-a.oregon-postgres.render.com/ecommerce_crafters_data
DATABASE_TEST_URL: postgres://ecommerce_crafters:SbURswsoV8KbisVverlrMFQ8SGusdp8a@dpg-cp0un1nsc6pc7382j630-a.oregon-postgres.render.com/ecommerce_crafters_data
DATABASE_PRODUCTION_URL: postgres://ecommerce_crafters:SbURswsoV8KbisVverlrMFQ8SGusdp8a@dpg-cp0un1nsc6pc7382j630-a.oregon-postgres.render.com/ecommerce_crafters_data
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ bin-release/
*.ipa
*.apk

# Envirnoment variables
.env

# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
# should NOT be excluded as they contain compiler settings and other important
# information for Eclipse / Flash Builder.
Expand Down
8 changes: 4 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node'
};
preset: 'ts-jest',
testEnvironment: 'node',
setupFilesAfterEnv: ['./jest.config.js'] // Assuming the setup file is called jest.setup.js
};
2 changes: 1 addition & 1 deletion src/database/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const dotenv = require('dotenv')
dotenv.config()
module.exports = {
"development": {
"url": process.env.DATABASE_DEVELOPMENT_URL,
"url": process.env.DATABASE_TEST_URL,
"dialect": "postgres",
"dialectOptions": {
"ssl": {
Expand Down

0 comments on commit 59d3c01

Please sign in to comment.