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
Post a Comment