title: How to assign routes within a base route in fastify
body: <p>I am using fastify as a web framework in my nodejs project. I want to call all my routes from a directory having a base route defined in main JS file like we do in express. I have read many blogs but i did not find any relevant answer to my question</p>
  
  <p>like in express we assign routes as-</p>
  
  <pre><code>app.use('/user', user_route)
  </code></pre>
  
  <p>and then in user_route we define all other routes method.</p>
  
  <p>In fastify I have used </p>
  
  <pre><code>fastify.register(require('./routes/users'), { prefix: '/user' })
  </code></pre>
  
  <p>but then only one function can be called like- </p>
  
  <pre><code>module.exports = function (fastify, opts, done) {
    fastify.get('/user', handler_v1)
    done()
  }
  </code></pre>
  
  <p>What if I want to call multiple route function?</p>