File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
docker/edgev3/webapp/server Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -69,15 +69,17 @@ const runApp = async () => {
6969 . connect (
7070 db ,
7171 {
72- authSource : "admin" ,
73- user : config . DATABASE . USERNAME ,
74- pass : config . DATABASE . PASSWORD ,
75- useCreateIndex : true ,
76- useNewUrlParser : true ,
77- useUnifiedTopology : true ,
78- }
79- )
80- ) ;
72+ authSource : "admin" ,
73+ user : config . DATABASE . USERNAME ,
74+ pass : config . DATABASE . PASSWORD ,
75+ useCreateIndex : true ,
76+ useNewUrlParser : true ,
77+ useUnifiedTopology : true ,
78+ }
79+ )
80+ . then ( ( ) => logger . info ( "MongoDB successfully connected" ) )
81+ . catch ( err => logger . error ( "Failed to connect to MongoDB server:" , err ) ) ;
82+
8183 logger . info ( `Successfully connected to database ${ db } ` ) ;
8284 // start server
8385 app . listen ( config . CRON . SERVER_PORT , ( ) => logger . info ( `HTTP CRON server up and running on port ${ config . CRON . SERVER_PORT } !` ) ) ;
You can’t perform that action at this time.
0 commit comments