code: async function startApp(middlewareConfig, config) {
    const {
      port = DEFAULT_PORT,
      host = DEFAULT_HOST,
    } = config
  
    // close all connections when running nodemon
    const sigListener = async () => {
      await app.destroy()
      process.kill(process.pid, 'SIGUSR2')
    }
    process.once('SIGUSR2', sigListener)
  
    const appMeta = await createApp(middlewareConfig, config)
    const { app } = appMeta
  
    const server = await listen(app, port, host)
  
    enableDestroy(server)
    app.destroy = async () => {
      await destroy(server)
      process.removeListener('SIGUSR2', sigListener)
    }
    const { port: p } = server.address()
  
    const url = `http://localhost:${p}`
  
    const router = new Router()
  
    return { ...appMeta, router, url, server }
  }
docs: Start the server.
  @param {MiddlewareConfig} [middlewareConfig] Middleware configuration.
  @param {Config} [config] Configuration object.