title: ERR_SSL_PROTOCOL_ERROR when i try to connect with localhost
body: <p>I'm beginning to study node js and im trying to connect an ionic app with my backend nodejs app that i have created but im getting this error:</p>
  
  <p>OPTIONS <a href="https://localhost:3000/insert" rel="nofollow noreferrer">https://localhost:3000/insert</a> net::ERR_SSL_PROTOCOL_ERROR</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { Http } from '@angular/http';
  import { map } from 'rxjs/operators';
  
  @Component({
    selector: 'app-cadastro-unidade',
    templateUrl: './cadastro-unidade.page.html',
    styleUrls: ['./cadastro-unidade.page.scss'],
  })
  
  export class CadastroUnidadePage implements OnInit {
  
    constructor(private http: Http) { }
  
    ngOnInit() {
  
    } 
  
    InsereDados(){
      let data = {
      };
  
      this.http.post('https://localhost:3000/insert', data).pipe(
              map(res =&gt; res.json())
          ).subscribe(response =&gt; {
              console.log('POST Response:', response);
          });
    }
  
  }
  
  app.get('/insert', function(req, res, next) {
  var uri = "xxxx"
      MongoClient.connect(uri,{ useNewUrlParser: true }, function(err,client){const collection = client.db("test").collection("teste");
      console.log("connected");
  
      var ins={DataEntrada:"x",DataSaida:"x",HorarioEntrada:"x",HorarioSaida:"x",Prontuario:"x",TipoSaida:"x"};
  
      collection.insertOne(ins, function(err,res){
        console.log("data inserted");
  
      })
  
      client.close();
      })
      res.render(res)
  });
  </code></pre>