Skip to content

Instantly share code, notes, and snippets.

@craigmulligan
Last active March 15, 2016 17:08
Show Gist options
  • Save craigmulligan/610f023d0e4647cd3586 to your computer and use it in GitHub Desktop.
Save craigmulligan/610f023d0e4647cd3586 to your computer and use it in GitHub Desktop.
basic example of node reboot
var resin = require("resin-sdk")
var credentials = { email:unicorn@resin.io, password:******* };
var uuid = "7cf02a6"
resin.auth.login(credentials, function(error) {
if (error != null) {
throw error;
}
console.log("success authenticated with resin API")
reboot();
});
function reboot() {
resin.models.device.reboot(uuid, function(error) {
if (error) throw error;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment