Peer to Peer Filesharing in Pure Javascript With Node.js and BinaryJS
JavaScript CoffeeScript CSS Shell Racket
Pull request Compare This branch is 157 commits ahead of Miserlou:master.
Latest commit 5ee50eb Aug 18, 2013 @orefalo latest versions
Failed to load latest commit information.
client update ua-parser Mar 20, 2013
githubhook wrong pkg Dec 5, 2012
server express should trust proxy Mar 24, 2013
.gitignore damn typos Mar 20, 2013
QuickShare.jpg use a smaller image Dec 5, 2012 Fix typo in readme Mar 12, 2013
app.js 1st commit Dec 5, 2012
package.json latest versions Aug 18, 2013


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


  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.


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


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.


  • 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.


  • Detect unsupported browsers
  • Rework the about page


Node.js Rocks! Olivier Refalo