Skip to content

docs(adapter-node): list which env vars custom servers must implement#15914

Open
vamshikrishnaramasamy wants to merge 1 commit into
sveltejs:mainfrom
vamshikrishnaramasamy:docs/issue-15734-custom-server-env-vars
Open

docs(adapter-node): list which env vars custom servers must implement#15914
vamshikrishnaramasamy wants to merge 1 commit into
sveltejs:mainfrom
vamshikrishnaramasamy:docs/issue-15734-custom-server-env-vars

Conversation

@vamshikrishnaramasamy
Copy link
Copy Markdown

closes #15734

When you set up a custom server using handler.js from @sveltejs/adapter-node, only the request-handling environment variables (e.g. ORIGIN, BODY_SIZE_LIMIT) actually do anything. The server-lifecycle ones (PORT, HOST, SOCKET_PATH, the various timeouts, and the socket-activation pair) are read by index.js (the default node build server) and have to be implemented manually if you want them in a custom server. The current docs don't mention this, and the existing code example hardcodes port 3000 without flagging that it's ignoring PORT.

Added a note right after the custom-server code example listing both sets explicitly. Cross-checked the variable lists against the source in packages/adapter-node/src/handler.js and packages/adapter-node/src/index.js.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check. N/A — docs-only change.

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset. N/A — docs-only.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 27, 2026

⚠️ No Changeset found

Latest commit: 9675377

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

Add note for custom Node.js server implementation

1 participant