UNPKG

twee

Version:

Twee Framework - the most powerful, elegant and extensive framework for Node.js based on Express.js

17 lines (14 loc) 414 B
"use strict"; /** * Extension that shows how it works */ module.exports.extension = function(){ twee.getApplication().all('/extension', function(req, res){ res.json({response: tr('This is simple extension!')}); }); if (!twee.helper.hello) { twee.registerViewHelper('hello', function(name){ return tr("Hello {{name}}", {name: name}); }); } };