Rendering engines for a backend in MEANJS stack

We are creating a website that allows users to write email templates and select items that will be automatically filled in. The program is a MEANJS stack and in the nodejs back-end we have a javascript object with a few variables that we want to use to fill into the slots created by the user in the front end.

The problem we are having is finding an appropriate rendering engine to use with a back-end, where we have a string containing slots and an object to fill in the slots.

We have been looking at handlebars but most of the documentation is regarding front end use.

The question is: Do you have any experience using a rendering engine in a javascript back-end and if so what would you recommend?

Its usually known as a templating engine. I recommend using express-handlebars. I have used this before and I can vouch for it. If you are looking for something more barebones but like handlebars, I would recommend the javascript port of twig.