Using Mustache Templating engine with Express
To use the Mustache templating engine in Express, you first install the mustache-express package …
npm install mustache-express –save
and then add the require module…
This sets up the “views” sub-folder to hold the mustache templates with files ending in file extension “html”. I’ve put the “hello.html” template in there with this content…
The “yourname” is a variable data that we pass to the template from the application by replacing the “send” call with the “render” call to the template name (without the file extension). See code above.
Now when you run it, it will render…