Guest User

Untitled

a guest
Nov 13th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. import mysql from 'mysql'
  2.  
  3. export class DB {
  4.  
  5. constructor() {
  6. this.db = mysql.createConnection({
  7. host: '...host',
  8. user: '..login',
  9. password: '...pass',
  10. database: 'selected_database',
  11. supportBigNumbers: true,
  12. bigNumberStrings: true
  13. })
  14. }
  15.  
  16. Connect() {
  17. this.db.connect();
  18. return this.db;
  19. }
  20.  
  21. }
Add Comment
Please, Sign In to add comment