This repository contains the final code for the Building Web Applications with hapi course on Pluralsight.com updated to the latest hapi version (13.4.1 for the moment).
git clone https://github.com/kodemi/pluralsight-hapi-final-code.git
cd pluralsight-hapi-final-code
npm install
node server.js
-
To use file in handlers you need to install and register inert module.
-
For template rendering with
server.view
you need to install and register vision module. -
Configuration of good plugin has been changed since hapi 8.
-
If your app crashes with error Error: Failed to encode cookie (sid) value: Password string too short (min 32 characters required) be sure to set minimum 32 characters password in auth.strategy config:
server.auth.strategy('default', 'cookie', { password: 'minimum-32-characters-password1234567890', // min 32 characters required https://github.com/hapijs/hapi/issues/3040 redirectTo: '/login', isSecure: false });
-
Mandrill is now a paid MailChimp add-on. You have to choose an alternative. Check out, for example: Is Mandrill Done? 5 Alternatives for Your Transactional Email. I chose SendGrid. Register on site and create API KEY likewise for Mandrill in course video. SendGrid has official node.js library.