copy code for node-js-sample