Skip to content

Peer to Peer Filesharing in Pure Javascript With Node.js and BinaryJS

Notifications You must be signed in to change notification settings

anweshtiwari/QuickShare

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

A complete rewrite a DirtyShare featuring:

  • Node 8.x
  • Express 3.x
  • Whiskers templates
  • Less CSS
  • BinaryJS for cleaner websocket transfers
  • Connect-Asset to dynamically uglify/compress resources in production
  • A slick UI
  • Production deployment ready

##Motivation

  1. Learning the node.js eco-system
  2. Have a fast way to share large file between two peers

###What does it do?

It streams files between two peers using a node.js process as the middle man. The application is heavily dependent upon the latest HTML5 standards: websockets, fileapi, drag & drop, advances css styling and animations.

##Installation

Node.js needs to be preinstalled in your system. If you run OSX, install HomeBrew, then type brew install node

  1. Clone the repo, cd to folder
  2. Install dependencies: npm install
  3. Start in DEV: node app.js
  4. Start in PROD: npm start

##Flow

Master          Server       Slave
  |  join(hash)  |            |
  |------------->|  get/hash  |
  |              |<-----------|
  |   start      |            |
  |<-------------|            |
  |              |            |
  | sendChunk    | fileChunk  |
  |------------->|----------->|
  | progress upd |            |
  |<-------------|            |
  |              |            |

##Production deployment

  • The project provides a github hook, that automatically deploys in PRODUCTION upon updates to the PROD branch.

##Limitations

  • Only works with Chrome for now
  • Since this is dealing with WebSockets, you can't hide node behind a typical web-proxy. Consider HA-Proxy, kernel port forwarding or direct exposition.

##Todo

  • Detect unsupported browsers
  • Rework the about page

##Author

Node.js Rocks! Olivier Refalo

About

Peer to Peer Filesharing in Pure Javascript With Node.js and BinaryJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 75.9%
  • CoffeeScript 10.5%
  • CSS 10.4%
  • Shell 3.1%
  • Perl 0.1%