index.js
function onResponseFinished() {
			// Resolve the payload from the 'request' and 'response' objects,
			// and send it to the Jarmo server, catching any errors.
			var payload = config.resolve(req, res, Date.now() - start);

			if(!payload) {
				// If the payload is falsy we don't send the data. This allows
				// for some ad hoc filtering with custom resolve functions.
				return removeListeners();
			}

			return send(config.host, config.port, payload, function(err) {
				if(err) {
					config.error(err);
				}
				return removeListeners();
			});
		}
function onResponseFinished() {
			// Resolve the payload from the 'request' and 'response' objects,
			// and send it to the Jarmo server, catching any errors.
			var payload = config.resolve(req, res, Date.now() - start);

			if(!payload) {
				// If the payload is falsy we don't send the data. This allows
				// for some ad hoc filtering with custom resolve functions.
				return removeListeners();
			}

			return send(config.host, config.port, payload, function(err) {
				if(err) {
					config.error(err);
				}
				return removeListeners();
			});
		}
function onResponseFinished ( ) { // Resolve the payload from the 'request' and 'response' objects, // and send it to the Jarmo server, catching any errors. var payload = config . resolve ( req , res , Date . now ( ) - start ) ; if ( ! payload ) { // If the payload is falsy we don't send the data. This allows // for some ad hoc filtering with custom resolve functions. return removeListeners ( ) ; } return send ( config . host , config . port , payload , function ( err ) { if ( err ) { config . error ( err ) ; } return removeListeners ( ) ; } ) ; }
Get the data out of the request and response and send it to the
configured server. Also make sure to remove listeners when done.
Get the data out of the request and response and send it to the configured server . Also make sure to remove listeners when done .