Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefixing hapi-io routes #9

Open
saidimu opened this issue Aug 5, 2015 · 2 comments
Open

Prefixing hapi-io routes #9

saidimu opened this issue Aug 5, 2015 · 2 comments

Comments

@saidimu
Copy link

saidimu commented Aug 5, 2015

It appears prefixing hapi-io doesn't work as it does for other hapi plugins.

server.register({
  register: hapio
},  {
  routes: { prefix: API_VERSION_PATH }
},...);

The above snippet implies socket.io should be listening at host + API_VERSION_PATH but that isn't the case. The prefix makes no difference.

What am I missing here?

@sibartlett
Copy link
Owner

I haven't looked into adding support for the prefix option. Could you try the following code, and let me know if it works for you:

server.register({
  register: hapio,
  options: {
    socketio: {
      path: API_VERSION_PATH + '/socket.io'
    }
  }
});

@Gattermeier
Copy link

@sibartlett I can confirm this does not work.
More specifically this does not work for using the hapi-io plugin for routes in a plugin with a route prefix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants