title: Error with Service Worker registration
body: <p>I'm trying to register a service worker but I have the following error:</p>
  
  <blockquote>
    <p>Failed to register a ServiceWorker: The URL Protocol of the current
    origin ('null') is not supported</p>
  </blockquote>
  
  <p>I'm under localhost with node js and I have my <em>index.html</em> and <em>service-worker.js</em> in the same folder</p>
  
  <p>index.html</p>
  
  <pre><code>&lt;!doctype html&gt;
    &lt;html&gt;
    &lt;head&gt;
    &lt;title&gt;TryService&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
    PROVA SITO CON SERVICE WORKER
    &lt;script&gt;
       if('serviceWorker' in navigator){
          // Register service worker
           navigator.serviceWorker.register('service-worker.js').then(function(reg){
              console.log("Registration OK!. Scope is "+reg.scope);
          }).catch(function(err){
              console.error("Registration FAILED! "+err);
          });
      }
    &lt;/script&gt;
  
    &lt;/body&gt;
    &lt;/html&gt;
  </code></pre>
  
  <p>service-worker.js </p>
  
  <pre><code>console.log('Started', self);
  self.addEventListener('install', function(event) {
    self.skipWaiting();
    console.log('Installed', event);
  });
  self.addEventListener('activate', function(event) {
  console.log('Activated', event);
  });
  self.addEventListener('push', function(event) {
    console.log('Push message received', event);
  });
  </code></pre>
  
  <p>How can I fix it?
  Thank you in advance!</p>