I have this template.html that I am going to use as an email template, on loopback/nodejs. in PHP I able to do the following:
ob_start();
include template.php;
$template = ob_get_clean();
Is there anyway possible I can do this with javascript?
I have this template.html that I am going to use as an email template, on loopback/nodejs. in PHP I able to do the following:
ob_start();
include template.php;
$template = ob_get_clean();
Is there anyway possible I can do this with javascript?
Found the solution in this link, thanks to Matt
const fs = require('fs');
var template = fs.readFileSync('template/emailtemplate.php','utf8');
console.log(template);