Open margani opened 3 years ago
I had to add the following to the sample code to make it work:
app.set('views', path.join(__dirname, "views"));
Here is the sample code for using with express:
var express = require('express'); var app = express(); var ECT = require('ect'); var ectRenderer = ECT({ watch: true, root: __dirname + '/views', ext : '.ect' }); app.set('view engine', 'ect'); app.engine('ect', ectRenderer.render); app.get('/', function (req, res){ res.render('index'); }); app.listen(3000); console.log('Listening on port 3000');
Shall we update it?
I had to add the following to the sample code to make it work:
Here is the sample code for using with express:
Shall we update it?