Started learning to convert this to NodeJs