title: self signed certificate error on electron js
body: <p>I am making an app for my own use, when I try to post JSON to my PHP server at example.com, I get the following error:</p>
  
  <blockquote>
    <p>Uncaught Error: self signed certificate error</p>
  </blockquote>
  
  <p>I tried the following code and it works:</p>
  
  <pre><code>process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0
  </code></pre>
  
  <p>but I believe this approach is dangerous. What is the safe way to solve this error? I tried googling but did not find anything useful or maybe because I am a beginner I did not understand it.</p>