error handling for mongoose.connect

I think all the code for mongoose should be refactored out of app.js but this will at least provide a simple error message if mongo is not running.