I have 2 values on localhost and i want to get them

i want to get these values from localhost
image
These two values are there i want to fetch them.
Iam using node.js for backend. and simple html page for front end.

http.createServer(function(req,res)
{
	res.writeHead(200,{'content-Type':'text/plain'});
	let name;
	let email;
	con.connect(function(err)
{
	if(err) throw err;
	console.log("connected");
	var q = "SELECT * FROM basic_info";
	con.query(q,function(err,result)
	{
		 name = result[0].name;
		 email = result[0].email;
		console.log(" name is: "+name+"\n email is: "+email);
		res.write(name+","+email);
		con.end();
		res.end();
	});
});
	
	
}).listen(8080);

this is front end . iam blank don’t know what to do.

<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" ></script>
<script>
</script>
</head>
<body>
</body>
</html>