File tree Expand file tree Collapse file tree 2 files changed +11
-15
lines changed
Expand file tree Collapse file tree 2 files changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,10 @@ name: Node.js CI
55
66on :
77 push :
8- branches : [ "main" ]
9-
8+ branches : ["main"]
109
1110jobs :
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
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ const mongoose = require("mongoose");
22mongoose . set ( "strictQuery" , false ) ;
33require ( "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
78const connectDB = async ( ) => {
89 try {
You can’t perform that action at this time.
0 commit comments