Created
March 20, 2014 11:01
-
-
Save RyanHirsch/9661403 to your computer and use it in GitHub Desktop.
Hapi Pack through code or through Composer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "servers": [ | |
| { | |
| "port" : 8000, | |
| "labels": ["public"] | |
| } | |
| ], | |
| "plugins": { | |
| "capi-web": { } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Hapi = require('hapi'); | |
| var pack = new Hapi.Pack(); | |
| pack.server(8000, { labels: ['public'] }); | |
| pack.require('capi-web', {}, function(err) { | |
| }); | |
| pack.start(function () { | |
| console.log('All servers started'); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The labels need to be in options, like: