Created
February 5, 2016 14:29
-
-
Save zemlanin/28098f91dcb046a8048c to your computer and use it in GitHub Desktop.
castcl.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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