projeto-hit/TEST_SERVER1/whats/funcs/mongoConn.js

18 lines
314 B
JavaScript
Raw Permalink Normal View History

const { MongoClient } = require('mongodb')
const uri = process.env.DB_MONGO_URL
const mongo = new MongoClient(uri)
async function run() {
try {
await mongo.connect()
console.log('Connectado ao mongo db')
} catch (err) {
console.log(err)
}
}
run()
module.exports = mongo