These are chat archives for LearnBoost/mongoose

5th
Jul 2015
Nick Ferraro
@Spidy88
Jul 05 2015 19:49
Is it normal to get duplicate 'connected' events from mongoose?
var connection = mongoose.createConnection(mongoUrl);

    connection.on('connected', onConnected);
    connection.on('disconnected', onDisconnected);
    connection.on('error', onError);

    return connection;

    function onConnected() {
        logger.info('mongo connected');
    }

    function onDisconnected() {
        logger.info('mongo disconnected');
    }

    function onError(err) {
        logger.error('mongo error', {error: err});
    }
Nick Ferraro
@Spidy88
Jul 05 2015 21:34
nvm, issue with foreman/throng/ my code location