Using particle-api-js on local cloud


#1

I’m running a local instance of the particle cloud and would like to use the JS SDK kit. When I try logging in it points me to http://api.particle.io/oauth/token so I went into the node_modules/particle-api-js/lib/Defaults.js and changed the base url to point to my local server instead. I still get an error, is there anyway that I can use the SDK for a local cloud and not point to particles cloud.

particle.login({username: '__admin__', password: 'adminPassword'}).then(
  function(data) {
    token = data.body.access_token;
  },
  function (err) {
    console.log('Could not log in.', err);
  }
);