Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import mysql from 'promise-mysql'
- class Mysql {
- constructor() {
- const options = {
- host: '127.0.0.1',
- user: 'root',
- password: '',
- database: 'abode_db'
- }
- mysql.createConnection(options).then(conn => {
- this.connection = conn
- })
- }
- }
- export default new Mysql()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement