Skip to content

Conversation

mfdebian
Copy link
Contributor

This PR adds the missing ESM counterparts of the CJS examples for the TLS (SSL) documentation.

While I normally try not to touch the current CJS examples, this time I went ahead and destructured the (require) imports following a feedback I had received in a previous PR so that examples from both CJS and ESM are as similar as possible so new users don't get confused.

I've also taken the liberty to add a snippet to explain how to generate the necessary files for both the client and the echo server examples similar to what I had done for the https.createServer example so new users can try them out of the box sorta speak, or at least without having to search for the extra-steps.

I've tested every single example and they all work/behave as expected but tell me what you think and I can update them!

Best regards!

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. tls Issues and PRs related to the tls subsystem. labels Dec 11, 2024
Copy link
Contributor Author

@mfdebian mfdebian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed a little error right after sending the PR, will fix!

`server-cert.pem` should be `client-cert.pem`
@lpinca lpinca added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Dec 12, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 13, 2024
@nodejs-github-bot nodejs-github-bot merged commit b87ecc7 into nodejs:main Dec 13, 2024
25 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in b87ecc7

@marco-ippolito marco-ippolito added the backport-requested-v20.x PRs awaiting manual backport to the v20.x-staging branch. label Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backport-requested-v20.x PRs awaiting manual backport to the v20.x-staging branch. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. doc Issues and PRs related to the documentations. tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants