An open API service indexing awesome lists of open source software.

https://github.com/msachi/hapi-intro

An introductory code-along for hapi.js framework
https://github.com/msachi/hapi-intro

Last synced: 5 months ago
JSON representation

An introductory code-along for hapi.js framework

Awesome Lists containing this project

README

          

## hapi.js - introductory code-along

_Before we start, please clone this repo. It contains the `public` folder with some example files (`html`,`css`,`js`) which we will practice serving using hapi. If you prefer you can create your own `public` folder with arbitrary files._

The code-along will be based largely on [this hapi tutorial](https://hapijs.com/tutorials/getting-started?lang=en_US).

We will cover the following:
1. Setting up a new project
2. Creating a server
3. Adding a 'Hello, world' route
4. Adding a route that renders user-provided data
5. Serving a static page with `inert`
6. Serving multiple public files
7. Breaking the code up into modules

Further resources:
- [Routing tutorial](https://hapijs.com/tutorials/routing)
- [Serving static files](https://hapijs.com/tutorials/serving-files)