Hope you all are doing good. Could you please elaborate why its happening. I have a button of id 'signin'. I want when I press the button I want to get data from the db, but I got an error "document isn't define". I am new to js. Eager to hear from you.
var connection = mysql.createConnection({
host : 'localhost',
user : 'abc',
password : abc,
database : 'abc'
});
connection.connect();
document.getElementById('signin').addEventListener('click', async () => {
Console.log("Hello! ")
})
function newApp() {
const win = new BrowserWindow({ width: 700, height: 400 })
win.loadURL(
url.format({
pathname: "index.html",
slashes: true
})
);
}