Skip to content

Commit d4a83d1

Browse files
committed
final code
1 parent 5dd2113 commit d4a83d1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/node.js.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ jobs:
2626
- run: npm ci
2727
- run: npm run build --if-present
2828
- run: pm2 restart api
29+
- run: |
30+
touch .env
31+
echo "${{ secrets.MONGO_DB_URL }}" > .env

db/db.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ const mongoose = require("mongoose");
22
mongoose.set("strictQuery", false);
33
require("dotenv").config();
44

5-
const uri =
6-
"mongodb+srv://samin:[email protected]/?retryWrites=true&w=majority&appName=Cluster0";
5+
const uri = process.env.MONGO_DB_URL;
76

87
const connectDB = async () => {
98
try {

0 commit comments

Comments
 (0)