Can't connect to mongolab.com
<p>When running <code>nodemon server</code> it logs <code>"Server running successfully on port 3000."</code> but it doesn't log whatever is in the <code>mongoose.connect</code> function. Not even an error.</p>

<h2>Config file</h2>

<pre><code>module.exports = {
    'database': 'mongodb://root:mypw@LINK-REMOVED/officr',
    'port': process.env.PORT || 3000,
    "secretKey": "key"
}
</code></pre>

<h2>Server.js</h2>

<pre><code>var express = require('express');
var bodyparser = require('body-parser');
var morgan = require('morgan');
var config = require ('./config.js')
var mongoose = require('mongoose');
var app = express();

mongoose.connect(config.database, function(err){
    if(err){
        console.log(err);
    }else{
        console.log('Connected to database.')
    }
});


app.use(bodyparser.urlencoded({ extended: true}));
app.use(bodyparser.json());
app.use(morgan('dev'));

app.get('*', function(req, res){
    res.sendFile(__dirname + '/public/index.html');
})

app.listen(config.port, function(err){
    if(err){
        console.log(err);
    }else{
        console.log('Server running successfully on port 3000.');
    }
})
</code></pre>