Node, mysql sequential query execution (async/await method)

mysql consecutive queries

This is not a guide to JavaScript callbacks, promise, async/await works, there are many free tutorials made by professionals and simple to find on google Prerequisites:NodeJs 7.6+npm mysqlFor this example, I’ll use the query SELECT sleep(x) to return 0 after x seconds Let’s see the code: The result is: The two queries were run in … Read more

Mysql in NodeJs > pools, select, insert, update, delete and question marks

mysql node

Here some notes on how I do connect node and mysql Note: those note are based on the mysql packageMore info here: https://www.npmjs.com/package/mysqlInstallation: $ npm install mysqlI’m not using mysql2 nor sequelize. Disclaimer:This page contains note to how to connect node to mysql, is not meant for production and could have performance and security issues. … Read more