This repo contains material created for a talk given at london.js on Tuesday, March 15, 2016 called "Time to be Hapi".
You first need to install node.js if you do not already have it on your computer. Then download the code from github:
$ git clone https://github.com/glennjones/time-to-be-hapi.git
or
$ curl -L https://github.com/glennjones/time-to-be-hapi/tarball/master | tar zx
The slides are built in html and the file slides/index.html
can be dragged into a browser.
I have built code examples for most of the sections of the presentation.
- Move into the project directory
$ cd time-to-be-hapi
- Run
$ npm i
- Move to one of the code example directories i.e.
$ cd code-example\02 adding routes
- Run
$ node app
- Connect to the server in a browser using
http://localhost:3000
or read the comments at the top of each app.js file for web addresses to view.
Move through each code example directory re-running stages 3-4
- hapi server
- adding routes
- registering plugins
- templates
- pure json config
- handlers for business logic
- display route tables
- validation
- onPostHandler
- method, bind and decorate
- caching
- authentication
- proxy
- logging
- batching
- docmentation
- waypointer