title: How to get the full dynamic URL in NodeJS?
body: <p>There is already a <a href="https://stackoverflow.com/questions/10183291/how-to-get-the-full-url-in-express">similar thread</a> which seems alike but here I've some different problem.</p>
  
  <p>I want the full URL where URL is dynamic. I'm using a common nunjuk template for all of my pages.</p>
  
  <p>Let's face it. Suppose I've an URL path:</p>
  
  <blockquote>
    <p>/blog/one/two/three</p>
  </blockquote>
  
  <p>Notably, the "blog" is static but the "one", "two" and "three" are variables which will change as per the requested blog post on my website.</p>
  
  <p>I'm using the following code to get the URL from by passing ":post" but how when I add more path sub-directories like "one", "two" or "three" in the url, I get "template not found" error.</p>
  
  <pre><code>router.get('/blog/:post', function (req, res) {
              var path = req.params.post;
  
              var title2 = JSONFile[path].title;
              var date2 = JSONFile[path].date;
              var author2 = JSONFile[path].author;
              var content2 = JSONFile[path].content;
  
              res.render('blogposts.html', {
                      title : title2,
                      date: "date2",
                      author: "author2",
                      content: "content2"
              });
      });
  </code></pre>
  
  <p>My question is: How can I get all the dynamic URL sub-paths after "/blog"? And remember, the sub-paths may also extend to "four" or "five" and so on.</p>