Skip to content

Commit ef4dc7c

Browse files
committed
add new route
1 parent e572a90 commit ef4dc7c

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

.github/workflows/node.js.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ name: Node.js CI
55

66
on:
77
push:
8-
branches: [ "main" ]
9-
8+
branches: ["main"]
109

1110
jobs:
1211
build:
13-
1412
runs-on: self-hosted
1513

1614
strategy:
@@ -19,14 +17,11 @@ jobs:
1917
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2018

2119
steps:
22-
- uses: actions/checkout@v3
23-
- name: Use Node.js ${{ matrix.node-version }}
24-
uses: actions/setup-node@v3
25-
with:
26-
node-version: ${{ matrix.node-version }}
27-
cache: 'npm'
28-
- run: npm ci
29-
- run: npm run build --if-present
30-
- run: |
31-
touch .env
32-
echo "${{ secrets.MONGO_DB_URL }}" > .env
20+
- uses: actions/checkout@v3
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
cache: "npm"
26+
- run: npm ci
27+
- run: npm run build --if-present

db/db.js

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

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

78
const connectDB = async () => {
89
try {

0 commit comments

Comments
 (0)