I use node-red as the bridge between node.js and openHAB
https://nodered.org/
and the node-red-contrib-openhab2 nodes