fix(examples/ts): align custom client env vars with .env-local#2341
Merged
phdargen merged 1 commit intoMay 17, 2026
Merged
Conversation
The custom client example referenced process.env.SERVER_URL (undefined in .env-local) and hardcoded /weather, silently falling back to the localhost default. Align with the canonical pattern used by the fetch and axios client examples.
|
@feldmannn is attempting to deploy a commit to the Coinbase Team on Vercel. A member of the Team first needs to authorize it. |
phdargen
approved these changes
May 17, 2026
Collaborator
phdargen
left a comment
There was a problem hiding this comment.
Thanks for the fix @feldmannn
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.
Description
The TypeScript custom client example at
examples/typescript/clients/custom/index.tsreadsprocess.env.SERVER_URL(which is not declared in this example's.env-local) and hardcodes the path/weather. As a result, developers following the.env-localtemplate see no effect from their edits: the env-var fallbackhttp://localhost:4021always wins, and the path is unconfigurable despite.env-localprovidingENDPOINT_PATH.Every other client example in the same directory (
fetch/,axios/) already uses the canonical three-line pattern. This PR aligns the custom client with that pattern:The new three-line block is byte-identical to
examples/typescript/clients/fetch/index.ts:15-17andexamples/typescript/clients/axios/index.ts:16-18. No other changes to the file, the example README, or.env-local.Disclosure: this change was prepared with the help of an AI coding assistant. The diff was independently reviewed and verified line-for-line against the canonical sibling pattern before commit.
Tests
There are no tests in
examples/typescript/clients/custom/(it ships as a runnabletsxexample, not a build target). Local verification performed againstmain:pnpm installfromexamples/typescript/: exit 0pnpm-lock.yamldiff vsmain: empty (passescheck_package_lock.yml)fetch/index.ts:15-17andaxios/index.ts:16-18: confirmedChecklist