0

I'm trying to run the localhost angular app in https but getting The site cant be reached now/localhost refused to connect. I tried creating ssl certificate and key and placed in angular.json but still am facing this issue by running command ng serve --ssl true --port 44314

 "serve": {
          
"builder": "@angular-devkit/build-angular:dev-server",
          
"options": {
            "browserTarget": "app.com:build"
             "sslKey": "src/localhost.key",
            "sslCert": "src/localhost.crt"
          }
}
Palani
  • 9
  • 5
  • Does this answer your question? [Get angular-cli to ng serve over HTTPS](https://stackoverflow.com/questions/39210467/get-angular-cli-to-ng-serve-over-https) – kellermat Dec 03 '22 at 19:21
  • I tried the same way it is not but when we create a new angular project with latest version it is working. – Palani Dec 07 '22 at 05:02

0 Answers0