Proper way to reference files relative to application root in Node.JS

Try

var templateContent = fs.readFileSync(path.join(__dirname, '../templates') + '/my-template.html', 'utf8');

Leave a Comment