Guest User

Untitled

a guest
Dec 15th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. const mysql = require('promise-mysql');
  2.  
  3. let connection
  4.  
  5. async function duck(conn) {
  6. return connection.query('SELECT date FROM messages')
  7. }
  8.  
  9. async function main() {
  10. connection = await mysql.createConnection({
  11. host: 'localhost',
  12. user: 'root',
  13. password: 'root',
  14. database: 'duckmessenger',
  15. })
  16.  
  17. console.log(await duck())
  18. }
Add Comment
Please, Sign In to add comment