Skip to content

Instantly share code, notes, and snippets.

@roman-bgonz
Created January 20, 2023 00:42
Show Gist options
  • Save roman-bgonz/5f1733294f8e30cbb7a768f0b4988486 to your computer and use it in GitHub Desktop.
Save roman-bgonz/5f1733294f8e30cbb7a768f0b4988486 to your computer and use it in GitHub Desktop.
Test angular app as domain in local

1 Modify C:\Windows\System32\drivers\etc\hosts

  ip                    domain
  10.51.97.138		app.com

2 Generate certs to run app over https

  https://medium.com/@richardr39/using-angular-cli-to-serve-over-https-locally-70dab07417c8#fromHistory

3 Modify package.json as follows

  "start": "ng serve --port 443 --host 0.0.0.0 --disable-host-check --ssl --ssl-key E:\\certs\\localhost.key  --ssl-cert E:\\certs\\localhost.crt",

4 Run app

  npm run start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment