A NodeJS real-time websocket application for chat, drawing and getting Twitter feeds.
This project is purely developed for academic/training purpose.
In this NodeJS websocket project, you have the option to either use socket-io
which is supported through websocket_server_socketio.js
or the custom class I created websocket_server.js
that initiates the protocol upgrade, handshake as well as encodes/decodes the data packets/payload.
Since this project uses a Twitter stream functionality, it uses these npm libraries.
You can refer to the API documentation found here for more information.
https://www.npmjs.com/package/twit
https://www.npmjs.com/package/ntwitter
- Install the package
npm install
- Twitter stream support
You also need to create a Twitter application for oauth credentials.
http://docs.inboundnow.com/guide/create-twitter-application/
After doing so, you need to set the credentials found in this filecore/twitter_stream.js
.
// found in the function TwitHandler.prototype.Init
var sConsumerKey = '<your credential>';
var sConsumerSecret = '<your credential>';
var sAccessTokenKey = '<your credential>';
var sAccessTokenSecret = '<your credential>';
Once you have the NodeJS server up and running, simply open collab.html
through a web browser and you're good to go.
This is an open source project under the MIT license. For more information, please refer to license.txt