title: Add prefix to all api's in hapi
body: <p>I have this code written in <code>index.js</code> file. My api's are running successfully on the <strong><code>/</code></strong> path. Now I need add a prefix to all my api's. I don't want to add one by one by editing each file. I need to do in one go.</p>
  
  <pre><code>composer((err, server) =&gt; {
    if (err) throw err
  
    server.initialize((errInit) =&gt; {
      if (err) throw errInit
      server.register({
        register: require('hapi-cron'),
        routes: { prefix: '/api' },
        options: {
          jobs: []
        }  
      }, (err) =&gt; {
        server.start(() =&gt; {
          const env = process.env.NODE_ENV
          const msg = `${env} server started at ${server.info.uri}`
          server.log(['server', 'info'], msg)
          if (_.includes(['sandbox', 'production'], env)) {
          }
        })    
      })   
    })
  })
  </code></pre>
  
  <p>How Can I do this? Thank in advance!!!</p>