{"size": 534, "ext": "js", "max_stars_repo_path": "arduino-websocket/script.js", "max_stars_repo_name": "hemstreet/Javascript-Boilerplates", "max_stars_repo_stars_event_min_datetime": "2015-07-10T14:21:38.000Z", "max_stars_repo_stars_event_max_datetime": "2015-07-10T14:21:38.000Z", "max_issues_repo_path": "arduino-websocket/script.js", "max_issues_repo_name": "hemstreet/Javascript-Boilerplates", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "arduino-websocket/script.js", "max_forks_repo_name": "hemstreet/Javascript-Boilerplates", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.8, "max_line_length": 45, "alphanum_fraction": 0.5074906367}
var _ = require('underscore'),
    socket = require('socket.io-client');

var obj = {

    config: require('./config/config.json'),

    init: function () {

        socket = socket(this.config.url);

        socket.on('connect', function () {
            console.log('connected');
        }.bind(this));

        socket.on('mock-event', function () {
            console.log('mock event fired');
            this.go();
        }.bind(this));

    },

    go: function() {

        console.log('do some logic');

    }
};

obj.init();