Ce code :
var app = require('express').createServer();
var ejs = require('ejs');
var fs = require('fs');
var indexTemplate = fs.readFileSync(__dirname + '/templates/index.html');
app.get('/', function(req, res){
res.end(ejs.render(indexTemplate, {}));
});
Donne l'erreur suivante
Erreur de type : Objet ne possède pas de méthode 'substr'. at Object.parse (/home/lowerkey/node_modules/ejs/lib/ejs.js:152:20) at /home/lowerkey/node_modules/ejs/lib/ejs.js:192:13 at Object.render (/home/lowerkey/node_modules/ejs/lib/ejs.js:235:10) at /home/lowerkey/workspace/address book/server/server.js:60:14 at callbacks (/home/lowerkey/node_modules/express/lib/router/index.js:272:11) at param (/home/lowerkey/node_modules/express/lib/router/index.js:246:11) at pass (/home/lowerkey/node_modules/express/lib/router/index.js:253:5) at Router._dispatch (/home/lowerkey/node_modules/express/lib/router/index.js:280:4) at Object.handle (/home/lowerkey/node_modules/express/lib/router/index.js:45:10) at next (/home/lowerkey/node_modules/express/node_modules/connect/lib/http.js:203:15)
Qu'est-ce que je fais de mal ?