hapi Starter

For hapi beginners: step by step from zero to deployment

In this ready-made beginner path you’re going to learn hapi step by step. Create a project with multiple routes, view rendering support, serving CSS, JS files and images. Further, add authentication and restrict access with scopes. Finally, deploy and run your app in production. Ready to make it rock? BOOM! 💥

Curriculum

 

Get the Ball Rolling

Make Your Site Look Sexy

  • Don’t skip this part if you hate beautiful design. Well, you should know how to render beautiful views and serve CSS or client-side frameworks.
  • 05

    Register the vision to your hapi server and add view rendering support for various templating engines.

  • 06

    Using the inert plugin allows you to easily server static files, like CSS, JS, and images.

Authentication & Access Control

Requests and Incoming Data

  • Clients of any kind will bombard your server with requests. Make use of different methods that clients may use to transfer data to your server.
  • 11

    User’s will send data to your server and you need to know how to access it.

  • 12

    Pick up query parameters if you want to transfer information from client to server within the URL.

  • 13

    The URL can consist of multiple elements divided by a given character, mostly the forward slash “/”. Make use of path parameters and benefit from complex setups with multiple or wildcard ones.

Validation, aka “Never Ever Trust User Data”

Deploy & Run Your App in Production

  • That’s your main goal: ship your app to production. Once it’s online, you want it to run consistently. PM2 is your friend, especially for zero downtime deployments :)
  • 17

    Your site will be always on! With zero downtime deployments, you can deploy as often as possible, without interrupting the service.

  • 🎯

What Setup Do I Need?

The tools, frameworks & basics you need

  • Node.js v4 (or later)
  • NPM
  • Your favorite IDE

FAQ

 

Who is this learning path for?

It’s a beginner path, to get a grasp on hapi. Starters go from zero to production very quickly with an app that follows the recommendations of using hapi’s powerful plugin system.

Also, you’ll have an app with view support and delivering assets, like CSS, JS, and images to the client. Of course, you can deploy your app with zero downtime.

Does this learning path expire?

No expiration date. No plans to retire it. At some point, we might update or extend it though :)

Is there a cost attached to this learing path?

No! It’s completely free. Free for everyone. Free willy 🐋