node.js - need help choosing a templating engine valid both client & server side with express
I want to code an application with Node.js where templates and rendering code out of json would be the same on client & server side.
I would have like to use jquery templates as there is a port of jquery templates to Node.js through https://github.com/kof/node-jqtpl.
Nevertheless, with this solution, the templates开发者_运维百科 would be shared but not the rendering code.
Is there a templating solution where the template & rendering code would be the same ?
Thank you for your help
Jerome Wagner
https://github.com/janl/mustache.js/ Can be used on both server side and browser. Mustache is pretty awesome itself, never used it with Node.js per say, but had a go at it with Go, and it was nice. Give it a try.
try ICanHaz.
It's really really beautiful and easy to use. you can find an introduction here.
精彩评论