Skip to content

Commit

Permalink
Merge branch 'master' into LL-163
Browse files Browse the repository at this point in the history
  • Loading branch information
vliu36 committed Jun 8, 2024
2 parents cf0d5aa + 8014277 commit 449e032
Show file tree
Hide file tree
Showing 12 changed files with 33,161 additions and 31,191 deletions.
61,841 changes: 30,723 additions & 31,118 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@
"author": "",
"license": "ISC",
"dependencies": {
"dotenv": "^16.4.1",
"express": "^4.18.2",
"jest": "^29.7.0",
"mongoose": "^8.2.0",
"react-scripts": "^5.0.1",
"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 449e032

Please sign in to comment.