To fix problems arising due to the asynchronous nature of .listen(). Really it should be doing that console.log call inside a callback passed to listen. When the host is added, it tries to do a DNS lookup, which is async. So when that line tries to fetch the address, there isn't one yet because the DNS request is running, so it crashes.
removed new in app.js mongoStore
I've started improving the unit tests, but tobi doesn't seem to work correctly at the moment so I'll have to work on this later.
* Client-side sorting uses `toLowerCase` * Most persistent views are now on AppView * Nobody keeps document model references around unless they need them directly * Added `selectedDocument` to track the currently viewed document * Changed `refresh` to `reset` to support Backbone 0.5.0+ * Improved new account handling by handling an empty document list correctly