nw.js

DDRBoxman

Posted on
Jul 31 2015

I'm building an app with nw.js and was wondering if I should use the js or the node module for error reporting?


Daniel

Posted on
Jul 31 2015

Hey,

You want to use raygun4node with nw.js - should just be a matter of setting it up in your application initialisation.

Here's a quick sample from last time I looked at nw.js


var raygun = require('raygun');
var raygunClient = new raygun.Client().init({ apiKey: 'yourkey' });

raygunClient.user = function(req) {
   return 'example@example.com';
}

$(function() {
      $('#button').click(function() {
      raygunClient.send(new Error('NW phasers offline')); 
   }); 
});

Let me know how you get on.

Regards,

Daniel


Reply