title: Usage middleware and plugin Nuxtjs
body: <p>I have a problem with the good (and correct) construction of the application of Nuxt.js:</p>
  
  <p>I read the documentation, but I do not understand when to use plugins, middleware. And what is the difference between plugins and middleware (within 
   Nuxt.js)?</p>
  
  <p>I want use external source (easyrtc), but I do not know how best to load this source: as plugin or as middleware (easyrtc has client-side and server-side modules).
  I without problems connected server modules as plugins:</p>
  
  <p>for plugin
  <code>export default ({ app }, inject) =&gt; { app.easyrtc = server; }; )</code>
  for nuxt.config.js
  <code>{ src: '~plugins/easyrtc/server/easyrtc_server.js', mode: 'server' }</code></p>
  
  <p>I plan to create my own middleware-wrapper for work with easyrtc-server:</p>
  
  <p>My middleware-wrapper load plugins of easyrtc-server, and work with easyrtc.
  Do I correctly represent the interaction of middleware and plugins?</p>
  
  <p>Maybe I cover too much discussion area.
  So if you have questions about my problem, I will try to answer.</p>