O'Reilly logo

Mastering Web Application Development with Express by Alexandru Vlăduțu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Leveraging the Power of Template Engines

Node has a rich ecosystem of template engines available, and they can be used with Express, either out of the box or by writing a custom adapter.

In this chapter, we will cover the following topics:

  • The different types of template engines
  • View helpers and application-level data
  • Reusing code with layouts and partials
  • Updating cacheable templates in production
  • Integrating a template engine with Express

The different types of template engines

Template engines are tools that help us separate the application logic from the presentation layer. They usually combine multiple templates with a data model, thus improving the maintenance and flexibility of our web applications.

There are a lot of template engines ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required