infinite scrolling in EJS
问题 As the title says I am trying to implement infinite scroll on my page using ejs. Right now I have it set to render a finite number of items from my database to the page. Express JS side: app.get(`/`, (req, res) => { database.find({}, (err, items) => { if (!err){ res.render("home",{cards:items}); } else { console.log(err); } }).limit(20); }); On the the EJS side I have the items then displayed in EJS by means of a forEach loop. <%cards.forEach((i) => {%> <p><%=i.contents%></p> <%})%> Which