@@ -6,7 +6,7 @@ async function main(){
6
6
* See https://docs.mongodb.com/ecosystem/drivers/node/ for more details
7
7
*/
8
8
const uri = "mongodb+srv://<username>:<password>@<your-cluster-url>/test?retryWrites=true&w=majority" ;
9
-
9
+
10
10
/**
11
11
* The Mongo Client you will use to interact with your database
12
12
* See https://mongodb.github.io/node-mongodb-native/3.3/api/MongoClient.html for more details
@@ -32,10 +32,10 @@ main().catch(console.err);
32
32
33
33
/**
34
34
* Print the names of all available databases
35
- * @param {MongoClient } client A MongoClient that is connected to a cluster with the sample_airbnb database
35
+ * @param {MongoClient } client A MongoClient that is connected to a cluster
36
36
*/
37
37
async function listDatabases ( client ) {
38
- databases = await client . db ( "sample_airbnb" ) . admin ( ) . listDatabases ( ) ;
38
+ databases = await client . db ( ) . admin ( ) . listDatabases ( ) ;
39
39
40
40
console . log ( "Databases:" ) ;
41
41
databases . databases . forEach ( db => console . log ( ` - ${ db . name } ` ) ) ;
0 commit comments