Advertisement
Guest User

Untitled

a guest
Mar 7th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const pool = mysql.createPool({
  2.   connectionLimit : 10,
  3.   host: cfg.db.host,
  4.   user: cfg.db.user,
  5.   password: cfg.db.password,
  6.   database: cfg.db.database,
  7.   charset: 'CP1251',
  8.   timezone: 'Europe/Moscow'
  9. });
  10.  
  11. var funcs = {
  12.  
  13.     init: function () {
  14.             pool.query("SELECT * FROM `table`", function (error, results, fields) {
  15.                 if (error) throw error;
  16.             });
  17.     }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement