Created
August 23, 2019 11:13
-
-
Save brunokrebs/3b70197d07294d211b0bc4d7e4701406 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 { MongoMemoryServer } = require('mongodb-memory-server'); | |
async function connect() { | |
const mongoConnection = new MongoMemoryServer({ debug: true }); | |
const status = mongoConnection.getInstanceInfo(); | |
console.log(status); | |
const connectionString = await mongoConnection.getConnectionString(); | |
console.log('================================================================================='); | |
console.log(connectionString); | |
console.log('================================================================================='); | |
} | |
try { | |
connect().then(() => { | |
console.log('done'); | |
}); | |
} catch (e) { | |
console.error(e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment