Initial commit of port from ruby to nodejs