Document all supported environment variables in the example app README#332
Conversation
|
@ikemHood Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
There was a problem hiding this comment.
Code Review
This pull request updates the example/README.md to document all environment variables in a structured table format and introduces a new test suite (tests/example-readme-env-vars.test.ts) to verify that all environment variables are documented. Feedback includes correcting a minor typo in the README and refactoring the test assertions to use regular expressions instead of exact string matches, preventing fragile test failures due to markdown auto-formatting.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| | `PORT` | `3000` | Port the example server listens on. Must be a positive number. | | ||
| | `DATABASE_URL` | `file:/tmp/anchor-kit-example-<uuid>.sqlite` | Database location. `file:...` selects SQLite; otherwise PostgreSQL. | | ||
| | `INTERACTIVE_DOMAIN` | `http://localhost:3000` | Interactive flow domain used by SEP-24. | | ||
| | `SEP10_SIGNING_KEY` | fresh random keypair | SEP-10 challenge signing secret. Regenerated on every start unset. | |
There was a problem hiding this comment.
There is a minor typo in the description: "Regenerated on every start unset." It should be "Regenerated on every start if unset." for better readability.
| | `SEP10_SIGNING_KEY` | fresh random keypair | SEP-10 challenge signing secret. Regenerated on every start unset. | | |
| | `SEP10_SIGNING_KEY` | fresh random keypair | SEP-10 challenge signing secret. Regenerated on every start if unset. | |
| expect(readme).toContain('| `PORT` | `3000` |'); | ||
| expect(readme).toContain('| `CHALLENGE_EXPIRATION_SECONDS` | `300` |'); | ||
| expect(readme).toContain('| `WATCHERS_ENABLED` | enabled |'); |
There was a problem hiding this comment.
These assertions are highly fragile because they expect exact spacing in the Markdown table. If an auto-formatter (like Prettier) runs on README.md and aligns the table columns with extra spaces, these assertions will fail. Using regular expressions with \s* makes the test robust against formatting changes.
| expect(readme).toContain('| `PORT` | `3000` |'); | |
| expect(readme).toContain('| `CHALLENGE_EXPIRATION_SECONDS` | `300` |'); | |
| expect(readme).toContain('| `WATCHERS_ENABLED` | enabled |'); | |
| expect(readme).toMatch(/\|\s*`PORT`\s*\|\s*`3000`\s*\|/); | |
| expect(readme).toMatch(/\|\s*`CHALLENGE_EXPIRATION_SECONDS`\s*\|\s*`300`\s*\|/); | |
| expect(readme).toMatch(/\|\s*`WATCHERS_ENABLED`\s*\|\s*enabled\s*\|/); |
cba0ff5 to
47582b6
Compare
What does this PR do?
Updates the example app README to document every environment variable read by
example/express-app.ts, as a table with the current default for each. Defaults match the example app code.How to test?
bun run test— newexample README documents all env varssuite asserts each env var read by the example app is listed.Checklist
bun run testandbun run lintlocally.Issue Reference
Closes #273