Closed AmasiaNalbandian closed 2 years ago
This PR deals with the unhandled promise rejection error that keeps appearing in the console when trying to connect to the database.
There are still errors connecting to the database, which will be handled in another PR.
Essentially MongoDB requires to use the then/catch instead of the mongoose.connection.on method.
The error:
After handling the promise:
This PR deals with the unhandled promise rejection error that keeps appearing in the console when trying to connect to the database.
There are still errors connecting to the database, which will be handled in another PR.
Essentially MongoDB requires to use the then/catch instead of the mongoose.connection.on method.
The error:
After handling the promise: