I want to save HTML source of my pugfile rendered with data.
My route is:
res.render('pugfile', { data: resp });
How can I do that?
Try using this link and see whether it will be helpfull to you
The createTemplateFile function simply creates a new file if it doesn't exist.
The exportTemplateFile function saves the HTML in the html variable rendered by pug and prettifies it with the pretty package and then overwrites the new template file
Thats according to that post