I\'m working on creating a user registration system for a website that I am working on but I am running into a few issues.
I\'m trying to stay away from having to ne
Symplest solution I could find is the sync-sql module. Install the required modules
npm install sync-sql
npm install sync-mysql
Sample index.js
const Mysql = require('sync-mysql')
const connection = new Mysql({
host:'localhost',
user:'root',
password:'password',
database:'demo'
})
var result = connection.query('SELECT NOW()')
console.log(result)
https://www.geeksforgeeks.org/how-to-run-synchronous-queries-using-sync-sql-module-in-node-js/