Data channels are what I have in mind, but I can't seem to find any webrtc code that connects a browser to anything other than another browser.
There is this issue which is being worked on at the moment in the node-webrtc library:
https://github.com/js-platform/node-webrtc
Once that's resolved data channel connectivity between a browser and command-line app, server, etc should be reasonably simple. While this bug is outstanding, it is possible to fall back to Rtp data channels in the browser and if that is something that is of interest then we can look at putting together some examples with rtc.io if that would help you out.