Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const mysql = require('promise-mysql');
- let connection
- async function duck(conn) {
- return connection.query('SELECT date FROM messages')
- }
- async function main() {
- connection = await mysql.createConnection({
- host: 'localhost',
- user: 'root',
- password: 'root',
- database: 'duckmessenger',
- })
- console.log(await duck())
- }
Add Comment
Please, Sign In to add comment