I'm new progressive web app development. I successfully connected to mysql using node.js and extracted user table info but I don't know how to display it in html using the table tag
var mysql = require('mysql');
var con = mysql.createConnection({
host: "localhost",
user: "root",
password: "",
database: "election"
});
con.connect(function(err) {
if (err) throw err;
con.query("SELECT * FROM admin", function (err, result, fields) {
if (err) throw err;
console.log(result);
});
con.query("SELECT * FROM user", function (err, result, fields) {
if (err) throw err;
console.log(result);
});
});
this is the selectuser.js to connect and extract user table
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script type="text/javascript" src="/db/selectuser.js"></script>
</head>
<body>
<table>
<thead>
<tr>
<th>user_id</th>
<th>full_name</th>
<th>username</th>
<th>password</th>
<th>role</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
that's the html page (test.html) I'm trying to display each individual users information as a row in the table. Any help please??