Last active
April 28, 2019 01:52
-
-
Save nelreina/1d75fb76d285d714f614966afa8b6c9a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {MongoClient} = require( "mongodb"); | |
(async () => { | |
const client = new MongoClient(); | |
const url = 'mongodb://localhost:27017/test'; | |
const db = await client.connect(url); | |
console.log(await db.admin().listDatabases()); | |
await db.close(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment