Try this. In your app.js file render results
as JSON string like this.
res.render('homePage',{results: JSON.stringify(results)});
Now in your homepage.ejs use this:
const locationResults = <%- results %>
Note that it may cause some errors like "Expression expected .js" in your IDE. Just ignore it. Probably is VS Code compatibility with ejs
files