Skip to content

involvestecnologia/mysql2-lib

Repository files navigation

@involves/mysql2-lib

Build status Quality Gate Status

Install

npm install @involves/mysql2-lib --save

Example usage

    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)
    })

How to run the tests

At the terminal, just type the command:

make test