When I try to refer to db.startSession () I have an error db.startSession () is not a function. In console.log I put db and I put logged variable below. Why can’t I refer to startSession()? connection controller logged variable db Answer you can do like this for using transaction in mongoose: Note:for using transaction you need to replica mongodb, so
Tag: transactions
How to get a value in async function as soon as possible?
I’m working with Ethereum blockchain, but my problem my is JavaScript (async, await function). Here my code simplified: In my html In my App.js file Any help with any code of example? Thanks a lot in advance. Answer Welcome to the fantastic world of asynchronism… One way to do this would be : and in your App class :