1 min readNov 11, 2019
Hi Fernando, I haven’t used it with transactions, so I cannot answer that. To use async/await with Express.js, for example, you simply import the middleware like so:
const mysql = require('./database.js')module.exports.read = async (req, res, next) => {
var result = await mysql.query('SQL QUERY HERE') // Do something with result.
}