20 lines
415 B
JavaScript
20 lines
415 B
JavaScript
const {MongoClient} = require('mongodb')
|
|
|
|
const client = new MongoClient('mongodb://127.0.0.1:27017')
|
|
const mymongodb = client.db('labfin')
|
|
|
|
const start = async () => {
|
|
console.log('in start')
|
|
try{
|
|
await client.connect()
|
|
const mymongodb = client.db('labfin')
|
|
console.log('connected!!!!!!!!!11')
|
|
}
|
|
catch(e) {
|
|
console.log(e)
|
|
}
|
|
}
|
|
|
|
start()
|
|
|
|
module.exports = mymongodb |