Beaglebone green wireless gateway

Do you have latest node-red?

You could enable functionExternalModuels (see Function node use of npm modules) then add references to johnny-five and beaglebone-io in the setup tab of the function node. Then you write a function like so...

var five = require('johnny-five');
var BeagleBone = require('beaglebone-io');

var board = new five.Board({
    io: new BeagleBone()
});

board.on('ready', function () {
    // connect a Led on pin P9_14 of the beaglebone
    var led = new five.Led('P9_14');
    led.blink(1000);
    // this allows access to the led while the program is running
    this.repl.inject({ led: led });
});

See here for more info: Starting with Johnny-Five on the BeagleBone - MORPHOCODE