2012-08-12 66 views
0

我有一个index.html文件,我试图用dustjs,LinkedIn来呈现,但得到的错误:模板未发现但

500 Error: Template Not Found: C:\Users\Gilbert\WebstormProjects\NodeOfGames\views\index.html 

文件index.html肯定是存在的。我正在使用app.engine('html', require('dustjs-linkedin').render);来呈现带有灰尘的.html文件。

+1

请添加一些代码... – JAiro 2012-08-12 23:45:11

回答

1

dust.render看起来dust.cache的命名模板,而你的情况被命名为

C:\Users\Gilbert\WebstormProjects\NodeOfGames\views\index.html 

dust.render只呈现编译模板 - 这是根据负载自动放入dust.cache。

我不认为模板在那里。如果是这样,它可能没有用上面的名字命名。

您可能想要的是dust.renderSource。即使如此,你需要传递一个上下文和一个回调 - 我不确定这是如何工作的表达。