Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 798 Bytes

docs.README.md

File metadata and controls

40 lines (25 loc) · 798 Bytes

The HadoukenIO node-adapter allows the use of the Hadouken API from Node.js applications.

Requirements

  • Node.js LTS ^6.9

Install as dependency

$ npm install -S HadoukenIO/node-adapter

Usage

const { connect, Identity } = require("node-adapter");

connect({
    address: "ws://localhost:9696",
    uuid: "my-uuid-123"
}).then(logic).catch(connError);
   
function logic(fin) {
    
    fin.System.getVersion().then(v => console.log("Connected to Hadouken version", v));

    const win = fin.Window.wrap({ 
        uuid: "remote-app-uuid",
        name: "remote-window-name"
    });
        
    win.moveBy(500, 0).then(win.flash());
       
}

function connError(err) {

    console.log("Error triying to connect,", err.message);

    console.log(err.stack);
}