title: Error: callback function required
body: <p>I am trying to render an object into html using node,express and mongodb. when I tried the below code</p>
  
  <pre><code>var express=require('express'),
  app=express(),
  engines = require('consolidate'),
  nunjucks  = require('nunjucks');
  
  app.set('view engine', 'html');
  app.engine('html', engines.nunjucks);
  app.set('views', __dirname + '/views');
  
  app.get('/',function(req,res){
  res.render('index',{'name':'Hello'});
  })
  
  app.use(function(req,res){
  res.sendStatus(404);
  })
  
  var server = app.listen(3000,function(){
  var port=server.address().port;
  console.log('Express server listening on port', port);
  })
  </code></pre>
  
  <p>I am getting callback function error like below</p>
  
  <pre><code>D:\Wiki&gt;node app.js
  D:\Wiki\node_modules\express\lib\application.js:174
  if ('function' != typeof fn) throw new Error('callback function required');
                         ^
  
  Error: callback function required
  at Function.app.engine (D:\Wiki\node_modules\express\lib\application.js:174:
  38)
  at Object.&lt;anonymous&gt; (D:\Wiki\app.js:7:5)
  at Module._compile (module.js:409:26)
  at Object.Module._extensions..js (module.js:416:10)
  at Module.load (module.js:343:32)
  at Function.Module._load (module.js:300:12)
  at Function.Module.runMain (module.js:441:10)
  at startup (node.js:139:18)
  at node.js:968:3
  </code></pre>
  
  <p>can someone help me how to render html using nunjucks? Thanks in advance</p>