mozilla/makedrive — pull request #339 by humphd (2014-09-04 15:11:49+00:00)
Title: Fix #310 - Add node clustering support

This adapts some of the ideas from http://engineering.fluencia.com/blog/2013/12/20/the-4-keys-to-100-uptime-with-nodejs to MakeDrive.

@alicoding I haven't rebased to get your fix for the server crash we found. Can you try and recreate it with this patch, and see how it responds? The server should fork a new process when it dies (i.e., the server should stay up).

I've also cleaned up server/index.js (now named server/server.js) to match our coding style in other files.

I've also modified the tests to use the server directly (i.e., no clustering). Eventually we'll want to change this, but right now we can only run a single instance anyway (i.e., until we fix #304).