如何将 Angular cli 运行到 https://localhost:4200 SSL 模式

c0m*_*age 2 ssl angular

我试图弄清楚如何配置我的 Angular CLI 环境以在 SSL HTTPS 模式下运行。

现在,它在常规的http://localhost:4200中运行,但无法访问运行 https 模式的 webAPI。我可以通过 google postman 从 webapi 获取数据,但不能使用我的 Angular 应用程序。

首先,我输入 mmc 并找到我的个人证书,显示为

本地主机 IIS Express 开发

我在 stackoverflow 上阅读了有关更改 json 文件中的设置的信息。我找不到 angular.json 文件。我在 cli 文件夹中找到了 package.json 但是当

如何设置我的角度应用程序以 https 模式运行以访问数据。

现在,它只是挂起。

谢谢。

Fab*_*ato 9

你可以运行ng serve --ssl true