title: How to create nested routes with parameters using NestJS
body: <p>I need to build an API where most of the routes are prefixed with a common URL part which also has a parameter.</p>
  
  <p>In my specific case, my routes need to look like:</p>
  
  <p><code>/accounts/:account/resource1/:someParam</code> </p>
  
  <p><code>/accounts/:account/resource2/:someParam/whatever</code></p>
  
  <p><code>/accounts/:account/resource3/</code></p>
  
  <p><code>/accounts/:account/resource4/subResource/</code></p>
  
  <p>and so on..</p>
  
  <p>So ideally I would create a <em>parent</em> route <code>/accounts/:account/</code> which will contain the <em>children</em> routes (<code>resource1</code>, <code>resource2</code>, <code>resource3</code>, <code>resource4</code>, etc...).</p>
  
  <p>I also need the <code>:account</code> parameter to be accessible from all the children routes.</p>
  
  <p>What is the best way to achieve this with NestJS ?</p>