Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run Angular cli to https://localhost:4200 SSL mode

Tags:

angular

ssl

I am trying to figure out how to configure my Angular CLI environment to run in SSL HTTPS mode.

Right now, it runs in the regular http://localhost:4200 but it can't access the webAPI which is running https mode. I was able to get data from the webapi via google postman but not with my angular app.

In my start, I typed mmc and found my personal cert which shows as

localhost IIS Express Development

I read up on stackoverflow about changing the settings in a json file. I can't find the angular.json file. I found the package.json in the cli folder but when

how do I setup my angular app to run in https mode to access the data.

Right now, it just hangs.

Thanks.

like image 849
c0micrage Avatar asked Sep 12 '25 20:09

c0micrage


1 Answers

You can run ng serve --ssl true

like image 175
Fabio Carpinato Avatar answered Sep 14 '25 11:09

Fabio Carpinato