converted beats example to node app