node.js - Automatically reconnect to Twitter's Streaming API -


i using node module twit (https://github.com/ttezel/twit) stream data twitter. app update users ranking based on twitter activity screening tweet in rel time. should streaming permanently i'd prevent connection issue. possible attempt reconnect api if reason app crashes?

what correct way this?

i sure following code not recommended:

stream.on('disconnect', function (disconnectmessage) {   console.log(disconnectmessage);   stream.start(); }) 

many thanks


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -