updated node.js example with json response