mozilla/BrowserQuest — pull request #30 by bnoordhuis (2012-03-28 15:32:28+00:00)
Title: lazy-load memcache module, fix module load error

Don't require that the memcache module is installed if metrics_enabled=false.

Fixes this module load error:

```
$ node server/js/main.js

node.js:197
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module 'memcache'
at Function._resolveFilename (module.js:332:15)
at Function._load (module.js:279:25)
at Module.require (module.js:356:17)
at require (module.js:372:17)
at Object. (/home/bnoordhuis/src/BrowserQuest/server/js/metrics.js:4:16)
at Module._compile (module.js:443:26)
at Object..js (module.js:461:10)
at Module.load (module.js:350:32)
at Function._load (module.js:308:12)
at Module.require (module.js:356:17)
```