Tutorial by Examples

To install the Pug template rendering system, follow these steps: Have the Node.js environment installed on your machine Run npm install pug --save to install the pug module to your current project. You can now use pug in your project through the standard require mechanism: const pug = requi...
First, let's create a template to be rendered! p Hello World, #{name}! Save this in a file ending with the .pug extension (you can call it anything you like, but we will use view.pug in the following code to compile it). All that's left to do, now, is compile that template! Create a JS script f...

Page 1 of 1