Skip to content

Commit

Permalink
Merge pull request #29 from jagoda/doc-register
Browse files Browse the repository at this point in the history
Document plugin registration.
  • Loading branch information
Eran Hammer committed Jul 7, 2015
2 parents 8a9115a + 229c04e commit 909d902
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Expand Up @@ -12,6 +12,21 @@ methods for managing view engines that can be used to render templated responses
provides a built-in [handler](https://github.com/hapijs/hapi/blob/master/API.md#serverhandlername-method)
implementation for creating templated responses.

```js
var server = new Hapi.Server();
server.connection({ port: 8080 });

server.register({
register: require('vision')
}, function (err) {

if (err) {
console.log("Failed to load vision.");
}
});
```
**NOTE:** Vision is included with and loaded by default in Hapi < 9.0.

- [Examples](#examples)
- [EJS](#ejs)
- [Handlebars](#handlebars)
Expand Down

0 comments on commit 909d902

Please sign in to comment.