I am new to node.js and mongodb. I installed a mongodb collection called "article". I would like to show the entire article of these collections in a jade pattern. I used this code:
server.js:
articles: db.article.find()
index.jade:
-for article in articles
.row
.twelve.columns
.panel
li= article.text
Jade is really basic, but that will change. The fact is that when I run this code, the list in the jade template is empty and nothing is displayed. It looks like the variable 'articles' is empty.
Does anyone know how I can make this work?
thank
source
share