Skip to content

Peanoquio/websocket-app

Repository files navigation

practice-websocket

A NodeJS real-time websocket application for chat, drawing and getting Twitter feeds.
This project is purely developed for academic/training purpose.

Technical Overview

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

Installation

  1. Install the package
npm install
  1. 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 file core/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>';

Usage

Once you have the NodeJS server up and running, simply open collab.html through a web browser and you're good to go.

License

This is an open source project under the MIT license. For more information, please refer to license.txt

About

A NodeJS real-time websocket application for chat, drawing and getting Twitter feeds

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published