File tree Expand file tree Collapse file tree 4 files changed +2109
-0
lines changed Expand file tree Collapse file tree 4 files changed +2109
-0
lines changed Original file line number Diff line number Diff line change
1
+ node_modules /
Original file line number Diff line number Diff line change
1
+ import mongoose from "mongoose" ;
2
+
3
+ export function dbConnection ( ) {
4
+ mongoose
5
+ . connect ( `mongodb://localhost:27017` )
6
+ . then ( ( ) => {
7
+ console . log ( "DB Connected Succesfully" ) ;
8
+ } )
9
+ . catch ( ( error ) => {
10
+ console . log ( "DB Failed to connect" , error ) ;
11
+ } ) ;
12
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " ecartbackend" ,
3
+ "version" : " 1.0.0" ,
4
+ "description" : " " ,
5
+ "main" : " index.js" ,
6
+ "type" : " module" ,
7
+ "scripts" : {
8
+ "start" : " nodemon index.js" ,
9
+ "test" : " echo \" Error: no test specified\" && exit 1"
10
+ },
11
+ "engines" : {
12
+ "node" : " 18.12.0"
13
+ },
14
+ "keywords" : [],
15
+ "author" : " " ,
16
+ "license" : " ISC" ,
17
+ "dependencies" : {
18
+ "bcrypt" : " ^5.1.1" ,
19
+ "cors" : " ^2.8.5" ,
20
+ "dotenv" : " ^16.3.1" ,
21
+ "express" : " ^4.18.2" ,
22
+ "joi" : " ^17.9.2" ,
23
+ "jsonwebtoken" : " ^9.0.2" ,
24
+ "mongoose" : " ^7.4.4" ,
25
+ "morgan" : " ^1.10.0" ,
26
+ "multer" : " ^1.4.5-lts.1" ,
27
+ "nodemon" : " ^3.0.2" ,
28
+ "qrcode" : " ^1.5.3" ,
29
+ "slugify" : " ^1.6.6" ,
30
+ "stripe" : " ^13.9.0" ,
31
+ "uuid" : " ^9.0.1"
32
+ }
33
+ }
You can’t perform that action at this time.
0 commit comments