Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import mysql from 'promise-mysql'
  2.  
  3. class Mysql {
  4.   constructor() {
  5.     const options = {
  6.       host: '127.0.0.1',
  7.       user: 'root',
  8.       password: '',
  9.       database: 'abode_db'
  10.     }
  11.  
  12.     mysql.createConnection(options).then(conn => {
  13.       this.connection = conn
  14.     })
  15.  
  16.   }
  17.  
  18. }
  19.  
  20. export default new Mysql()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement