mongoose.connect(uri, { dbName: <your DB name> }) .then( () => { console.log('Connection to the Atlas Cluster is successful!') }) .catch( (err) => console.error(err));