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

[HapiJS /nes] Polling option fallback #4287

Closed
CarolineBoyer opened this issue Sep 22, 2021 · 1 comment
Closed

[HapiJS /nes] Polling option fallback #4287

CarolineBoyer opened this issue Sep 22, 2021 · 1 comment
Labels
support Questions, discussions, and general support

Comments

@CarolineBoyer
Copy link

Support plan

  • is this issue currently blocking your project? (yes/no): yes
  • is this issue affecting a production system? (yes/no): yes

Context

  • node version: 12.4.5
  • module version: 12.0.4
  • environment (e.g. node, browser, native): node/browser
  • used with (e.g. hapi application, another framework, standalone, ...): hapiJS
  • any other relevant information:

How can we help?

I looked at docs, as ell as open/closed issue using the 'polling' keyword and couldn't find how to add a polling fallback on hapijs such as this exists on library like socket.io.
We would want to use the publish/subscribe method as well as the hapiJS request with 'post/get' method.

/**CLIENT CODE connection **/
return this.socketClient.connect({
	reconnect: true, 	//whether the client should try to reconnect
	delay: 2000,		//time in milliseconds to wait between each reconnection attempt, cumulative
	maxDelay: 15000,	//the maximum delay time in milliseconds between reconnections
	retries: 10		//number of reconnection attempts
})
/** SERVER REGISTER **/
await server.register(
  {
    plugin: Nes,
    options: {
      heartbeat: {
        interval: 15000,
        timeout: 5000
      },
      auth: false
    }
  },
  {
    routes: process.env.ROOT_PATH ? {
      prefix: ROOT_PATH
    } : {}
  }
);

Is such a thing possible using hapiJS/nes ? Or is there another plugin we need to register to instead that would work like hapiJS/nes but with polling experience ?

@CarolineBoyer CarolineBoyer added the support Questions, discussions, and general support label Sep 22, 2021
@CarolineBoyer CarolineBoyer changed the title Polling option fallback [HapiJS /nes] Polling option fallback Sep 22, 2021
@devinivy
Copy link
Member

Closing in favor of hapijs/nes#320 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Questions, discussions, and general support
Projects
None yet
Development

No branches or pull requests

2 participants