Time to be Hapi - london.js talk
March 16, 2016 ยท View on GitHub
This repo contains material created for a talk given at london.js on Tuesday, March 15, 2016 called "Time to be Hapi".
Downloading
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
Slides
The slides are built in html and the file slides/index.html can be dragged into a browser.
Running the code example
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:3000or 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
Code examples
- 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