Skip to content

docs: improve local development instructions - #133

Open
ojedaJD wants to merge 3 commits into
nodejs:mainfrom
ojedaJD:jo/improve-development-docs
Open

docs: improve local development instructions#133
ojedaJD wants to merge 3 commits into
nodejs:mainfrom
ojedaJD:jo/improve-development-docs

Conversation

@ojedaJD

@ojedaJD ojedaJD commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Refs #127 and #128.

Documents the Node.js 24 requirement, static build steps, local serving command, preview URL, and rebuild workflow. Local builds now generate localhost asset URLs while Vercel preview and production builds retain their deployment origins.

Signed-off-by: JD De Dios Ojeda <89946133+ojedaJD@users.noreply.github.com>
@ojedaJD
ojedaJD requested a review from a team as a code owner August 28, 2026 18:34
@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-learn Ready Ready Preview Aug 29, 2026 4:08am

Request Review

@github-actions

Copy link
Copy Markdown

👋 Codeowner Review Request

The following codeowners have been identified for the changed files:

Team reviewers: @nodejs/nodejs-website

Please review the changes when you have a chance. Thank you! 🙏

@avivkeller avivkeller left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This doesn't resolve the mentioned issue

@AugustinMauroy

Copy link
Copy Markdown
Member

agree with aviv but the content is better IMO

Signed-off-by: JD De Dios Ojeda <89946133+ojedaJD@users.noreply.github.com>
@ojedaJD

ojedaJD commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback! I updated the PR to fix the underlying issue. Local builds now use localhost for asset URLs, while preview and production builds keep their existing URLs. I tested the local build, and everything loads correctly.

Comment thread doc-kit.config.mjs
? `https://${process.env.VERCEL_URL}`
: process.env.VERCEL_ENV === 'production'
? 'https://nodejs.org'
: 'http://localhost:3000';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Port 3000 can be taken... The thing is that this is defined at build-time... So nothing that can really be done, although it'd be cool if this port could be overridden. Although I doubt that many people will run this locally in a way that this could be a problem.

Comment thread CONTRIBUTING.md
Comment on lines +46 to +47
This repository requires Node.js 24. Install the dependencies and generate the
static site:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It requires the latest LTS, not Node.js 24

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I completely missed this lol

@avivkeller

Copy link
Copy Markdown
Member

I don't think this is an improvement, it's just rewording for the sake of rewording

@bmuenzenmeyer bmuenzenmeyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think this is an improvement, it's just rewording for the sake of rewording

It absolutely is an improvement, especially the mention to serve and the localhost origin. The referenced issues came out directly from sitting with a Code and Learn attendee that tripped up on these two points.

The comment about Node 24 is valid and should be normalized.

Comment thread CONTRIBUTING.md

## Building locally

This repository requires Node.js 24. Install the dependencies and generate the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
This repository requires Node.js 24. Install the dependencies and generate the
This repository requires the Node.js version specified in the [.nvmrc file](https://github.com/nodejs/learn/blob/main/.nvmrc). Install the dependencies and generate the

Comment thread README.md
Comment on lines +35 to 47
Use Node.js 24, install the dependencies, and build the static site:

```bash
npm install
npm run build # generates static site + Orama search DB in out/
npm run build
npx serve out
```

The build generates the static site and Orama search database in `out/`.
After starting the server, open <http://localhost:3000/learn>. Rebuild the site
after making changes to preview the updated content.

## Contributing

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Delete all this and defer to CONTRIBUTING.md for a single source.

Suggested change
Use Node.js 24, install the dependencies, and build the static site:
```bash
npm install
npm run build # generates static site + Orama search DB in out/
npm run build
npx serve out
```
The build generates the static site and Orama search database in `out/`.
After starting the server, open <http://localhost:3000/learn>. Rebuild the site
after making changes to preview the updated content.
## Contributing

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants