examples/example.js
function (name, data) {
            console.log("Custom handler for " + name);
            // Send information of the "deployment_info" event to an external service (here: Just an echo service)
            request("https://echo.getpostman.com/get?name=" + name + "&startTime=" + data.timestamp, function (error, response, body) {
                body = JSON.parse(body);
                if (!error && response.statusCode == 200) {
                    console.log("Here's the data we have just sent to the echo service:");
                    console.log("--------------------");
                    console.log(JSON.stringify(body.args)); // Show the sent data
                    console.log("--------------------");
                }
            });
        }
function (name, data) {
            console.log("Custom handler for " + name);
            // Send information of the "deployment_info" event to an external service (here: Just an echo service)
            request("https://echo.getpostman.com/get?name=" + name + "&startTime=" + data.timestamp, function (error, response, body) {
                body = JSON.parse(body);
                if (!error && response.statusCode == 200) {
                    console.log("Here's the data we have just sent to the echo service:");
                    console.log("--------------------");
                    console.log(JSON.stringify(body.args)); // Show the sent data
                    console.log("--------------------");
                }
            });
        }
function ( name , data ) { console . log ( "Custom handler for " + name ) ; // Send information of the "deployment_info" event to an external service (here: Just an echo service) request ( "https://echo.getpostman.com/get?name=" + name + "&startTime=" + data . timestamp , function ( error , response , body ) { body = JSON . parse ( body ) ; if ( ! error && response . statusCode == 200 ) { console . log ( "Here's the data we have just sent to the echo service:" ) ; console . log ( "--------------------" ) ; console . log ( JSON . stringify ( body . args ) ) ; // Show the sent data console . log ( "--------------------" ) ; } } ) ; }
Specify the custom event handlers
Specify the custom event handlers