Closed franzip closed 8 years ago
Hi @franzip– I think the issue is that you're passing plugin options where registration options (the second argument to server.register()
) are expected. To update your example, it should look more like this,
var config = require('./config');
...
manifest: {
server: {
...
},
connections: {
...
},
registrations: {
{
plugin: {
register: 'dogwater',
options: config.dogwater
}
},
{
plugin: {
register: 'poop',
options: config.poop
}
}
}
}
Also a little heads-up as a maintainer of the boilerplate, dogwater, and bedwetter– currently dogwater v1 and bedwetter v1 are not compatible. If you want to use bedwetter, you'll have to downgrade to dogwater 0.4.x. Sorry about that! Should be fixed soon enough.
Thanks a lot @devinivy ! Heads up extremely appreciated since I was checking the various package.json to find potential incompatibilities, and I think the only constraint should be Hapi which must be <= 12 for Glue to work. I don't think I'll be using bedwetter, as I really don't need auto generated API endpoints.
:+1: no problem @franzip!
Hey @devinivy
I thought that the registrations key must have a value of an array of objects like shown below instead of an object
var config = require('./config');
...
manifest: {
server: {
...
},
connections: {
...
},
registrations: [
{
plugin: {
register: 'dogwater',
options: config.dogwater
}
},
{
plugin: {
register: 'poop',
options: config.poop
}
}
]
}
Anyone know why this api was changed?
One reason the API was changed is to make plugin registration order well-defined and controllable. I didn't catch that you weren't passing an array!
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
I am using this boilerplate for a project.
This is the error I get when I run
npm start
:I have updated most of the dependencies and this is my package.json:
My manifest object looks like this (in /server.js):
This is /config.js:
The problem seems to be the object passed as option... passing an empty object makes poop registration works but not dogwater. As stated in the docs, I'm passing the plugin name as a string and an object for the options... what am I doing wrong?
Thank you in advance!