Receiving <Buffer> from Node JS Websocket
7b 22 69 6e 66 6f 22 3a 22 59 6f 75 20 61 72 65 20 75 73 69 6e 67 20 61 20 74 65 73 74 20 61 70 69 20 6b 65 79 22 7d
is a hexadecimal representation of {"info":"You are using a test api key"}
Just convert the buffer to string:
demoStreamer.on('message', (data) => {
console.log(data.toString()); // "{\"info\":\"You are using a test api key\"}"
// Retrieve the info message:
console.log(JSON.parse(data).info); // "You are using a test api key"
});