GDI.js is a drop-in replacement for node.js in windows desktop environment.

Suitable for personal prototyping, desktop utilities, hardware interfacing and much more.

const serial = new Serial();
const list = serial.enum();
if(serial.open(list[0].port,9600) === true) {
    serial.write("Hello",function() {
    console.log("data sent");
    serial.close();
  });
}
const audio = new Audio();
audio.play("test.ogg");
audio.release();                                                 
let voices = tts.enum();
tts.speak("Oooh hello from javascript",voices[0].speaker,function() {
console.log("done");
});                                                   
tcp.listen(1234,function(data,client) {
        console.log(data);  // incoming data
        client.send("bye"); // response
        client.close();     // end connection
});                                                

https://gdi.sh/dist/x64/gdi-setup.exe

https://gdi.sh/dist/x64/gdi.zip
                
Download Documentation Contribute
@psychip