diff --git a/.env b/.env new file mode 100644 index 0000000..87b7504 --- /dev/null +++ b/.env @@ -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 diff --git a/.gitignore b/.gitignore index 1c2b7f7..458115e 100644 --- a/.gitignore +++ b/.gitignore @@ -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. diff --git a/jest.config.js b/jest.config.js index 7d48ba5..6f865d6 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,5 +1,5 @@ module.exports = { - preset: 'ts-jest', - testEnvironment: 'node' - }; - \ No newline at end of file + preset: 'ts-jest', + testEnvironment: 'node', + setupFilesAfterEnv: ['./jest.config.js'] // Assuming the setup file is called jest.setup.js +}; diff --git a/src/database/config/config.js b/src/database/config/config.js index ca224f6..ed0267c 100644 --- a/src/database/config/config.js +++ b/src/database/config/config.js @@ -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": {