title: Displaying a JSON dataset as a table with Node.js and Express
body: <p>First of all, I would like to point out that I'm very new to Node.JS. I'm trying to use NodeJS to make a page containing multiple tables and info. My problem is, that I can't get the result from the SQL query into an HTML table. Currently I <code>.send</code> the data into an HTML page using express. </p>
  
  <p>Code that I use:</p>
  
  <pre><code>    var http = require('http');
      http.createServer(function(req, res) {});
        var mysql = require("mysql"); 
        var express = require('express');
        var app = express();
        console.log('Creating the http server');
        con.query('SELECT id ,name FROM customer', function(err, rows, fields)
      {
          console.log('Connection result error '+err);
          console.log('num of records is '+rows.length);
  
          app.get('/', function (req, res) {
            res.send(rows);
          });
  
      });
  
      app.listen(3002, function () {
        console.log('Example app listening on port 3000!');
      })
  </code></pre>
  
  <p>This prints all the data from my sql statement on my HTML page:</p>
  
  <pre><code>{"id":"1","name":"Robert"}
  {"id":"2","name":"John"}
  {"id":"3","name":"Jack"}
  {"id":"4","name":"Will"}
  </code></pre>
  
  <p>what I would like to have as result is :</p>
  
  <pre><code>id              Name
  1               Robert
  2               John
  3               Jack
  4               Will
  ..etc 
  </code></pre>
  
  <p>Is this even possible to do in Node JS? </p>