Actually I may have misunderstood - so you're trying to connect using your own code in Node.js, and are having trouble getting it to disconnect?
Could you share a simple bit of code where it happens for you?
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Actually I may have misunderstood - so you're trying to connect using your own code in Node.js, and are having trouble getting it to disconnect?
Could you share a simple bit of code where it happens for you?