Converting to node JS app