{"size": 668, "ext": "js", "max_stars_repo_path": "test-lambdaBin.js", "max_stars_repo_name": "botbits/lambda-bin-perf", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "test-lambdaBin.js", "max_issues_repo_name": "botbits/lambda-bin-perf", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test-lambdaBin.js", "max_forks_repo_name": "botbits/lambda-bin-perf", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.8333333333, "max_line_length": 91, "alphanum_fraction": 0.5613772455}
/* eslint-env node */
'use strict';

const debug = require('debug')('lambda-bin-perf:lambdaBin');
const APP_ID = 'lambda-bin';

exports.handler = function (event, context, callback) {
  require('./index').installGit()
    .then(result => {
      debug('%O', {status: `${APP_ID}: loaded`, result});
      callback(null, {
        statusCode: 200,
        body: JSON.stringify({ message: `${APP_ID}: loaded` })
      });
    })
    .catch(error => {
      debug('%O', {status: `${APP_ID}: loading failed`, error});
      callback({
        statusCode: 201,
        body: JSON.stringify({ message: `${APP_ID}: loading failed with error: ${error}` })
      });
    });
};
