title: Displaying javascript data in html after retrieving it from mysql
body: <p>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<a href="https://i.stack.imgur.com/zs0Sm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zs0Sm.png" alt="this is the mysql tables" /></a></p>
  <pre><code> var mysql = require('mysql');
  
  var con = mysql.createConnection({
      host: &quot;localhost&quot;,
      user: &quot;root&quot;,
      password: &quot;&quot;,
      database: &quot;election&quot;
  });
  con.connect(function(err) {
    if (err) throw err;
    con.query(&quot;SELECT * FROM admin&quot;, function (err, result, fields) {
      if (err) throw err;
      console.log(result);
    });
    con.query(&quot;SELECT * FROM user&quot;, function (err, result, fields) {
      if (err) throw err;
      console.log(result);
    });
  });
  </code></pre>
  <p>this is the selectuser.js to connect and extract user table</p>
  <pre><code>&lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
      &lt;title&gt;Document&lt;/title&gt;
      &lt;script type=&quot;text/javascript&quot; src=&quot;/db/selectuser.js&quot;&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;table&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;user_id&lt;/th&gt;
                  &lt;th&gt;full_name&lt;/th&gt;
                  &lt;th&gt;username&lt;/th&gt;
                  &lt;th&gt;password&lt;/th&gt;
                  &lt;th&gt;role&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;/td&gt;
                  &lt;/tr&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>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??</p>