npm install @involves/mysql2-lib --save
const express = require('express')
const { MysqlMiddleware } = require('@involves/mysql2-lib')
const app = express()
app.use(MysqlMiddleware.setMysqlIntegration)
app.get('/:id', (req, res) => {
const record = await req.integrations.mysql.query(`SELECT * FROM db.table WHERE id = ${req.query.id}`,
res.send(record)
})
At the terminal, just type the command:
make test