Skip to content

Instantly share code, notes, and snippets.

@zemlanin
Created February 5, 2016 14:29
Show Gist options
  • Save zemlanin/28098f91dcb046a8048c to your computer and use it in GitHub Desktop.
Save zemlanin/28098f91dcb046a8048c to your computer and use it in GitHub Desktop.
castcl.js
var Client = require('castv2-client').Client;
var Application = require('castv2-client').Application;
var util = require('util');
var MyApp = function() {
Application.apply(this, arguments);
};
MyApp.APP_ID = 'D60F290C';
util.inherits(MyApp, Application);
var client = new Client();
client.connect('cast-omers.local', function() {
console.log('connected, launching app ...');
client.launch(MyApp, function(err, app){
console.log(arguments);
})
});
client.on('error', function(err) {
console.log('Error: %s', err.message);
client.close();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment