Skip to content

Instantly share code, notes, and snippets.

@RyanHirsch
Created March 20, 2014 11:01
Show Gist options
  • Select an option

  • Save RyanHirsch/9661403 to your computer and use it in GitHub Desktop.

Select an option

Save RyanHirsch/9661403 to your computer and use it in GitHub Desktop.
Hapi Pack through code or through Composer
{
"servers": [
{
"port" : 8000,
"labels": ["public"]
}
],
"plugins": {
"capi-web": { }
}
}
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');
});
@savardc
Copy link

savardc commented Mar 20, 2014

The labels need to be in options, like:

"servers": [
{
  "port": 8000,
  "options": {
    "labels": ['public']
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment