May I know why with below code. The browser takes a long time to load? I am new to express and node js. It takes almost 10s.If I was to replace res.write with console.log, the problem does not surface.
app.get('/', function(req, res) {
res.write("<!doctype html>");
con.query('SELECT VoltageV from Voltage', function (err, rows, fields) {
if (err) throw err
var output = JSON.parse(JSON.stringify(rows));
res.write("<SELECT>");
res.write("</SELECT>");
});