Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed init.ps.1: "setx NODE_EXTRA_CA_CERTS" generation #155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion examples/helix-basic-nextjs/init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ try {
Write-Host "Generating Traefik TLS certificate..." -ForegroundColor Green
& $mkcert -install
& $mkcert "*.basic-company-nextjs.localhost"

# stash CAROOT path for messaging at the end of the script
$caRoot = "$(& $mkcert -CAROOT)\rootCA.pem"
}
catch {
Write-Error "An error occurred while attempting to generate TLS certificate: $_"
Expand Down Expand Up @@ -155,7 +158,7 @@ Write-Host
Write-Host ("#"*75) -ForegroundColor Cyan
Write-Host "To avoid HTTPS errors, set the NODE_EXTRA_CA_CERTS environment variable" -ForegroundColor Cyan
Write-Host "using the following commmand:" -ForegroundColor Cyan
Write-Host "setx NODE_EXTRA_CA_CERTS $(& $mkcert -CAROOT)\rootCA.pem"
Write-Host "setx NODE_EXTRA_CA_CERTS $caRoot"
Write-Host
Write-Host "You will need to restart your terminal or VS Code for it to take effect." -ForegroundColor Cyan
Write-Host ("#"*75) -ForegroundColor Cyan