Skip to content

Commit

Permalink
Fix console.err & format code
Browse files Browse the repository at this point in the history
  • Loading branch information
ljhaywar committed Jan 7, 2020
1 parent f14a102 commit 2340169
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions connection.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const {MongoClient} = require('mongodb');
const { MongoClient } = require('mongodb');

async function main(){
async function main() {
/**
* Connection URI. Update <username>, <password>, and <your-cluster-url> to reflect your cluster.
* See https://docs.mongodb.com/ecosystem/drivers/node/ for more details
Expand Down Expand Up @@ -28,13 +28,13 @@ async function main(){
}
}

main().catch(console.err);
main().catch(console.error);

/**
* Print the names of all available databases
* @param {MongoClient} client A MongoClient that is connected to a cluster
*/
async function listDatabases(client){
async function listDatabases(client) {
databasesList = await client.db().admin().listDatabases();

console.log("Databases:");
Expand Down

0 comments on commit 2340169

Please sign in to comment.