How to connect the handlebars to .hbs template?

I use the handlebars template engine in your express app. All of the templates have the extension .hbs
I inserted the example code from the office. site hbs and the template is not rendered. errors in the console. insert the same in plain html page - everything works. How to fix it?
July 4th 19 at 23:10
1 answer
July 4th 19 at 23:12
Do you use express? If Yes, then you need express-handlebars
You also need to set as "template engine" - handlebars.
app.engine('handlebars', exphbs({defaultLayout: 'main'}));
app.set('view engine', 'hbs'); //at off.use dock extension handlebars
Yes, I have it set. and client standardization does not work - mustafa_Wiega commented on July 4th 19 at 23:15

Find more questions by tags JavaScriptNode.js