Skip to content

chrisstraw/angular-ssl

Repository files navigation

angular-ssl

Demo Angular project showing how to use ssl for localhost

How I configure most of my projects (I prefer the workspace layout)

Angular Workspace Instructions

I found these instructions very beneficial when working though this process

https://digitaldrummerj.me/angular-local-ssl/


NOTE -> Requirement: you must have OpenSSL installed. I do this through https://chocolatey.org/

  1. To generate the key and crt files, open a terminal in certs and run. Once they are generated, I commit these files to the repo
openssl req -new -x509 -newkey 1rsa:2048 -sha256 -nodes -keyout localhost.key -days 3560 -out localhost.crt -config certificate.config.txt
  1. change the server to include the ssl flag
ng serve app-example-one --port 4321  -o --ssl true --ssl-key .\\certs\\localhost.key --ssl-cert .\\certs\\localhost.crt
  1. You will receive the ssl connection error. image

  2. You have to import the crt file into the Trusted Root Certification Authorities image

image

image

image

image

About

Demo Angular project showing how to use ssl for localhost

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published