Is it possible to assign an html file to a variable ? for example, I want to assign a file called helloworld.html which has Hello World inside it to var html and I will use that variable later on. I'm using nodemailer to create a simple e-mail template. (Node.js) Thank you.
Asked
Active
Viewed 25 times
0
-
Do you want to store mail message into html file ? – Mihai Alexandru-Ionut Feb 18 '17 at 11:18
-
Googling `node.js read file into variable` seems to have good results. I'm closing this as a duplicate of the first hit there; if it somehow doesn't fit your needs or I'm misunderstanding this, ping me in a comment. – Pekka Feb 18 '17 at 11:18
-
Alright thank you, I knew there's an answer out there in SO but couldn't find it. – Cédric Hadjian Feb 18 '17 at 11:21