Skip to content

Commit

Permalink
LL-319 (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikajledesma authored May 25, 2024
2 parents a76efdc + 50f7693 commit 8014277
Show file tree
Hide file tree
Showing 12 changed files with 33,818 additions and 30,901 deletions.
61,875 changes: 31,138 additions & 30,737 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
"author": "",
"license": "ISC",
"dependencies": {
"dotenv": "^16.4.1",
"express": "^4.18.2",
"jest": "^29.7.0",
"mongoose": "^8.1.1",
"react-scripts": "^5.0.1",
"express": "^4.18.2",
"typescript-coverage-report": "^0.7.0"
},
"devDependencies": {
"@types/dotenv": "^8.2.0",
"@types/jest": "^29.5.6",
"@types/mongoose": "^5.11.97",
"@types/node": "^20.10.0"
}
}
2 changes: 0 additions & 2 deletions src/notification/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ services:
- ./.env
volumes:
- ./publish:/app
- /app/node_modules
ports:
- 4000:4000
networks:
Expand All @@ -24,7 +23,6 @@ services:
- ./.env
volumes:
- ./subscribe:/app
- /app/node_modules
networks:
- microservice
depends_on:
Expand Down
3 changes: 2 additions & 1 deletion src/notification/publish/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
.env
18 changes: 18 additions & 0 deletions src/notification/publish/db.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import mongoose from 'mongoose';
import dotenv from 'dotenv';
dotenv.config();

const dbURI = `mongodb+srv://${process.env.MONGO_DB_USER}:${process.env.MONGO_DB_PASS}@luminositycluster-0.cgornhw.mongodb.net/Luminosity`; //MongoDb Connection String

mongoose.connect(dbURI);

const db = mongoose.connection;

db.on('error', console.error.bind(console, 'MongoDB connection error:'));
db.once('open', () => {
console.log('Connected to MongoDB');
});

export default {
dbURI
};
Loading

0 comments on commit 8014277

Please sign in to comment.