title: ExpressJS - How to change the value of key in the url of a get request
body: <p>So I am developing custom pagination functionality with express and mongoose. I have a get parameter called page and I need to change the value for every different page. The problem is that the way I do it it keeps appending "page" key-value pairs to the url like this "&amp;page=1&amp;page=1&amp;page=1". That is because I don't simply change the value of "page" but I append the key-value pair each time like so:</p>
  
  <pre><code>currentPageUrl: req.originalUrl + '&amp;page=' + currentPage
  </code></pre>
  
  <p>I need just to change the value of the "page" key. How can I accomplish this? Any advice, express helper function or custom solution would help a lot. Thanks in advance!</p>