Closed zenithtekla closed 8 years ago
Monkberry is now suitable only for web rendering.
But i have plans for adding server side rendering.
Hope this helps you
Thank you for your inputs. I gave a quick look at your reference and saw there ain't app.set('view engine', 'monkberry')
or the like.
To be more specific about my question
Assume, as in here, I loaded the routes with
require(routes)(app);
Do I need to use app.engine() like the commented part? How to declare it correctly for Monkberry instead of Swig?
If I don't need app.engine(), do I declare it with app.set('view engine', 'monkberry');
? or something, by the way, what is the extension for monkberry template files (html, mbr, mkb, or what)? for hoganjs
, it's hjs
and you name the files *.hjs
, for pug
and jade
(jade is deprecated), it's pug
and you name it .pug
/* swig & handlebars require engine to be declared
app.engine('html', swig.renderFile);
*/
app.set('views', view_path);
app.set('view engine', 'hjs');
Thank you very much.
Just Read elfet reply a moment after I replied. sorry. and I will definitely look forward to the server-side rendering capability of Monkberry, knowing it's extremely lightweight, fast and efficient (saw the benchmarks).
How to set monkberry to render view engine in Node Express app?