Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

async await mongoose connection

(async () => {
  try {
    await mongoose.connect(dbURI, dbOptions)
  } catch (err) {
    console.log('error: ' + err)
  }
})()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #async #await #mongoose #connection
ADD COMMENT
Topic
Name
5+7 =