I am following a Node.js tutorial.
Two lines for which I am not sure are:
app.set('view engine', 'html'); app.engine('html', hbs.__express); I checked the documentation for app.set and it only tells me:
Assigns setting name to value.
But my question is what's the relevance of using this. I googled it and wherever app.engine is used app.set is called before.
Let me know the significance of using app.set before the app.engine.
EDIT
I found the following line, but I am still unclear as I am using template engine very first time:
But we can tell Express to treat HTML files as dynamic by using the
view enginedirective, you see above.