Appendix C. Extending and configuring Express

Express does a lot right out of the box, but extending Express and tweaking its configuration can simplify development and allow it to do more.

C.1. Extending Express

Let’s start by looking at how to extend Express. In this section, you’ll learn how to

  • Create your own template engines
  • Take advantage of community-created template engines
  • Improve your applications using modules that extend Express

C.1.1. Registering template engines

Engines may provide Express support out of the box by exporting an __express method. But not every engine will provide this, or you may want to write your own engines. Express facilitates this by providing the app.engine() method. In this section, we’ll take a ...

Get Node.js in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.