T
T
titronfan2016-02-21 11:33:09
JavaScript
titronfan, 2016-02-21 11:33:09

Express-handlebars. How to compile a template file?

Hello!
We set a goal to send a letter, but from a template file using express-handlebars.
Template file example:
Hello {{ fullName }}!
As I understand it, I need to compile this template at the beginning, and then send this data (I use nodemailer).
So the question is - how to compile a template file using express-handlebars?
I saw examples on the net that this file is read using the fs object in nodejs. But I don't know if this is correct or not.
Thank you in advance.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question