Speed up development with full-stack environments for every branch.

Learn More

mockable NodeJS [Node.js and Hello World]

Forked from Hello World for Node.js.

47 Runs 49 Views 87 Copies

Hello world in Node.js



danpillay87 3

published 4 months ago

    function getSalesData() {
    var https = require('https');
    var url = 'https://demo6357459.mockable.io/googlehome/action/';
    https.get(url, function(res){
        var body = '';
        res.on('data', function(chunk){
            body += chunk;
        res.on('end', function(){
            var apiResponse = JSON.parse(body);
            var leads = apiResponse.leads;
    }).on('error', function(e){
          console.log("Got an error: ", e);
    Please login/signup to get access to the terminal.

    Your session has timed out.

    Dismiss (the page may not function properly).