Using node.js and modules with Nsbasic in AppStudio


I would like to make use of node.js and specific modules ( sonos and hue) in Appstudio, but cannot find out clearly how.
Is there a documented example ?

The following script which I found works when I load the javascript library jsHue.js as a code

> Button1.onclick=function(){
> var hue = jsHue();
> => {
>     if(bridges.length === 0) {
>         Textarea1.value= 'No bridges found 1';
>     }
>     else {
>         bridges.forEach(b => Textarea1.value = 'Bridge found at IP address :'+ b.internalipaddress);
>     }
> }).catch(e => console.log('Error finding bridges', e));
> }

But when trying with sonos js libraries I fail using them, clearly because I don’t do things as they should…
and cannot move forward due to lack of know-how.

Thank you


We’ve been using node.js for projects inhouse - it can be a useful addition to AppStudio.

The next version of AppStudio (coming soon) will make this easier. Watch this space and the blog for more news.


Looking forward to this, and hope it’s coming very soon.