hapi — How to Reply and Render Pug Views (Using Pug 2.0)

Pug is a feature rich template engine for Node.js and of course you can make use of it in your hapi project. Previously, the project was called Jade and the developers needed to rename it to Pug because of a registered trademark called “Jade”. Of course, that doesn’t reduce the quality of Pug and its road to the next major version 2.0.

In this tutorial, you’ll learn how to make use of Pug v2 templates in your hapi project by render and reply views with a custom view configuration. Don’t be scared about the custom configuration, you’ll see its requirement due to the —yet— missing out-of-the-box support in hapi.

hapi Series Overview

Continue reading

University Enrollment Required

Future Students benefit from value packed videos and tutorials.

Enroll to receive exclusive content or sign in if you’re already a Future Student.

Enroll me for $15/mo

Explore the Library

Find interesting tutorials and solutions for your problems.