Peer to Peer Filesharing in Pure Javascript With Node.js and BinaryJS
JavaScript CoffeeScript CSS Shell Racket
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 157 commits ahead of Miserlou:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


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