emweb-wt

emweb-wt is a module for emweb which adds support for Web Templates.

emweb-wt

emweb-wt is a module for emweb which adds support for Web Templates.

  • lexxy
$ npm install emweb-wt

To use emweb-wt in your project:

var emweb = require('emweb');
var emweb_wt = require('emweb-wt');
var server = new emweb.Server();
 
// set handler for .w files to emweb-wt's handler 
server.handlers.= emweb_wt.handlers.w;
 
// ignore requests for .wt files - they should only be accessed through a .w file 
server.handlers.wt = false;
 
server.start();