[chore] add npm run certs for the dev https pair - #83
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the README correction on
release/next(eed29bb): replaces thepasted openssl invocation with a script.
Why
vite.config.tsreadscerts/localhost.crt/certs/localhost.keyinside atry/catchthat returnsundefinedwhen they are missing, so the dev serverquietly serves plain http instead. WebXR and
getUserMediaboth require TLS,so on a fresh clone VR and voice chat fail with no error pointing at the cause.
The pair is gitignored (it holds a private key) - only
certs/req.cnfiscommitted - so every clone has to generate one.
What
scripts/gen-certs.cjs- generates the pair from the committedcerts/req.cnf--forceoverwritesnormally not on PATH for cmd.exe, which is what npm scripts use on Windows)
package.json-"certs": "node scripts/gen-certs.cjs"README.md- points atnpm run certsinstead of the raw openssl commandVerified
fresh generate, idempotent re-run,
--force, and missingreq.cnf(exit 1)openssl x509:CN=localhost,subjectAltName = DNS:localhost, DNS:*.localhost, not expiredprettier --checkclean against the repo.prettierrc, sonpm run lintstays greenNot run:
npm run build/npm run e2e. This adds a standalone script plus apackage.jsonscripts entry and touches nothing the app imports.Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com