title: How to read a local file in Javascript (Running from an Electron App)
body: <p>I have been searching for over an hour or so, and I cant find an answer to my question. Is there a way to get the text from a local file, using just a plain old file URL?</p>
  <p>I have found numerous ways to read a file via file input HTML tag, but I have had an incredible pain, finding a code example that can find a file, on my PC, using just plain old JS.</p>
  <p>The code will be inside an electron application.</p>
  <p>I need code examples. Something like this:</p>
  <pre><code>readFile(&quot;file:\\\\C:\path\to\file.txt&quot;,&quot;text/plain&quot;);
  
  readFile(url,mimetype){
   ....
  }
  </code></pre>