This repository has been archived by the owner. It is now read-only.
A simple playground for Web Workers
JavaScript CSS CoffeeScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Web Worker Sandbox

A testing ground for Web Workers, created for the book Async JavaScript.

Plug in your master script and your worker script, then click Run. When you've got something you want to show off, just share the link.

How does it work?

When you click Run, the two scripts are POSTed to the server and saved, and you're redirected to a URL containing the ID of the database entry.

When that URL is requested, the server sets a cookie containing that ID, so that when

new Worker('worker.js')

runs from the master script, that cookie is sent with the request—allowing the server to serve the right worker.js for the page.


To run your own Web Worker Sandbox, all you have to do is clone the repo, install Node 0.6.x, run npm install to fetch the dependencies, and create a mongodb.json file in this format:

  "username": "username",
  "password": "password",
  "address":  "",
  "db":       "dbname"

Pull requests welcome!


Available under the MIT License: