using npm to get url parsing code