Skip to content

Instantly share code, notes, and snippets.

@kselax
Created December 27, 2018 05:51
Show Gist options
  • Save kselax/b9d212d376a36faddb7b2f4f814ec930 to your computer and use it in GitHub Desktop.
Save kselax/b9d212d376a36faddb7b2f4f814ec930 to your computer and use it in GitHub Desktop.
wraper for mysql
const mysql = require('mysql2')
class DB {
constructor() {
this.pool = null
}
setOptions(options) {
this.pool = mysql.createPool(options)
}
}
module.exports = new DB()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment