EJS 无法与 Nodejs 一起使用 - 信息未正确显示在 EJS 中

EJS not working with Nodejs - Information is not showing in EJS correctly

我正尝试在我的文件中应用一个循环 'index.ejs' 但它没有显示信息。 做一些测试我看到文件 server.js 正在正确提取数据并且页面正确列出 <li> (db 中有 4 行,[=25 上有 4 <li> =]结构。

See my HTML code here:

See my server.js here

See the HTML result that I mentioned here

在你的 ejs 中,你正在做 for(var filmes of filmes),它正在重新分配 filmes 的值,也许可以尝试 for(var film of filmes)

编辑:也在 li 中使用 <%= film.nomeFilme %>