Category: Tutorials

How to manage cookies with Hapi

When you visiting the most of all sites in internet, you see the messages about cookies. Cookies it’s a small piece of data, which sends with every request to server. Cookies allow to get more information about what user do on site during the session. In Hapi, you can simply start to work with cookies

Using Good plugin to log in Hapi

To add logging in our Hapi-based application we will use a good-plugin. It’s official plugin from Hapi plugins ecosystem. Good plugin used to report and monitor Hapi server events. In this tutorial, I want to show you how to log to file, to console and to API-endpoints using good-plugin. Getting started Let’s go to an existing

How to use Pug with Hapi

This tutorial is compatible with hapi v17. Node and Hapi should be installed for work with this tutorial. In this quick post I will show how to use a Pug as a default template engine in your Hapi project. We will use information from previous article about how to use handlebars in Hapi. First of