code: function normalizeConnection(conn) {
    conn = conn || {};
    if (typeof conn === 'string') {
      var parts = conn.split('.');
      conn = {
        env: parts.pop(),
        app: parts.pop()
      };
    }
    // Determine environment to use
    conn.env = conn.env || process.env.NODE_ENV || 'development';
    // Use first app config if none specified
    conn.app = conn.app || Object.keys(connectionConfig)[0];
    return conn;
  }
docs: Make some sense out of a user supplied connection identifier eg 'app1.development' becomes { app: 'app1', env: 'development' } eg 'development' becomes { app: 'firstAppDefinedInConfigFile', env: 'development' } eg { env: 'production' } becomes { app: 'firstAppDefinedInConfigFile', env: 'production' } eg {} or '' become { app: 'firstAppDefinedInConfigFile', env: NODE_ENV or 'development' }