You can append the data to the page that is loading the JavaScript.
<html>
<body>
<ul id="results">
</ul>
</body>
</html>
replace
console.log(a.text());
with
$("#results").append('<li>' + a.text() + '</li>');
Based on your comment:
I see what you mean. I just researched cheerio
and found that you can load the html that I provided into a variable.
//outside of the each, declare $results
var $results = cheerio.load('<html><body><ul id="results"></ul></body></html>');
//instead of the first append I gave (above), use this
$results.append('<li>' + a.text() + '</li>');
then you can output the resulting html to the browser with something like
res.send($results.html());