MySQL

Connecting to MySQL from JavaScript

Install MySQL Driver

% npm install mysql

index.js

SELECT COUNT(*) AS usercount FROM users

async await

% npm install promise-mysql

index.js

SELECT COUNT(*) AS usercount FROM users

References