hapijs / glue

Server composer for hapi.js
Other
245 stars 62 forks source link

Conflicting routes when using prefix #30

Closed johanalkstal closed 9 years ago

johanalkstal commented 9 years ago

I have a manifest that looks like the following,

module.exports = {
  connections: [{
    host: 'localhost',
    port: 1337
  }],
  plugins: [
    {
      blipp: null
    },
    {
      vision: null
    },
    {
      './lib/plugins/user': null
    },
    {
      './lib/plugins/admin': {
        routes: {
          prefix: '/admin'
        }
      }
    }]
};

Both plugins adds a route that looks like this,

 server.route([
  { method: 'GET', path: '/', config: indexConfig }
]);

I get Error: New route / conflicts with existing / error.

Am I setting up the manifest wrong or are my expectations of how it should work wrong?

timmarinin commented 9 years ago

@johanalkstal: right now you should wrap your options you pass to plugin with [], it is discussed in #31.

johanalkstal commented 9 years ago

Thanks!

lock[bot] commented 4 years ago

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.