title: HAPI 17: Routes not registered
body: <p>Hi I am migrating to Hapi 17 from 16. I have my routes defined in a different file which I am trying to register as a plugin. But I get a 404 when I call the API. The routes are not registered with the server.</p>
  
  <p>This is my Server code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> 'use strict'
      const Hapi = require('hapi')
      const server = new Hapi.Server({ port: 1234, host: 'localhost' });
      const plugins = [{
        plugin: require('vision'),
        plugin: require('./methods/exampleMethod'),
        plugin: require('./routes/devices')
      }]
  
      async function registerPlugin(){
          await server.register(plugins)
      }
      registerPlugin().then( () =&gt; {server.start()})</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is my routes file devices.js:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>exports.plugin = {
      register: (server, options) =&gt;
      {
          server.routes = [{
              method: 'GET',
              path: '/v1/devices',
              handler: async function (request, h) {
                  const val = server.methods.testMethod("ankur")
                  const response = h.response('hello world ankur')
                  response.type('text/plain')
                  return response
              }
            }]
      },
      name: 'devices'
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Methods file</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>exports.plugin = {
      register: (server, options) =&gt; {
          server.method(
            {
              name: 'testMethod',
              method: function (id) {
                return new Promise(function (resolve, reject) {
                return resolve("Test method called")
                })
              }
            })
      },
      name: "exampleMethod"</code></pre>
  </div>
  </div>
  </p>
  
  <p>I am following the release notes for Hapi 17 and trying to register the routes as a custom plugin. However, when I hit the Get v1/devices I get a 404. </p>