Nodejs client, disconnecting

I can’t find any example on how to reconnect to cloud server. I think of something like this:

blynk.on(‘disconnect’, function() {
haLogger.info(“Blynk disconnecting”);
var result = blynk.connect();

});

Can somone help?

1 Like

@vshymanskyy
@Gunner
so finally how we can do this?(Reconnect the nodejs after disconnect)

Google Forever Service.

1 Like

you mean i google How Reconnect Blynk service on Nodejs?

@ulfgun

is it work?

No, do what I posted.

@Costas
Ok i installed forever service so how can i use it with Blynk?

@sh.abar.mard I might have misled you a little because I believe forever service might be more on the server side than the client side. On the server side it basically ensures it’s running 100% of the time, assuming you have configured the server correctly. As far as I know it’s the only software available to ensure a service will reliably restart after a crash / reboot etc with nodejs.

1 Like

@Costas
Ok i try it to understand.
an another question is how can i have multi node on each user on local server.
imagine that i have a local server and 2 users and every user want to have nodeJs (raspberry-for access on linux setting). so how can i do this?