docs(env): document NEXT_PUBLIC_APP_URL in .env.example, README and docs/ENVIRONMENT.md - #202
Open
Dev-dave01 wants to merge 1 commit into
Open
Dev-dave01 wants to merge 1 commit into
Dev-dave01 wants to merge 1 commit into
Conversation
…ickets#36) src/app/layout.tsx (metadataBase) and src/app/sitemap.ts both read NEXT_PUBLIC_APP_URL and fall back to http://localhost:3001, but the variable was undocumented, so production builds silently emitted localhost canonical/OG URLs and sitemap entries. Adds it to .env.example, the README Environment table, and docs/ENVIRONMENT.md, each noting that it must be set to the public origin in production.
|
@Dev-dave01 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! 🚀 |
❌ Deploy Preview for stellartickets failed.
|
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.
Closes #36
Problem
src/app/layout.tsx(metadataBase) andsrc/app/sitemap.tsboth readNEXT_PUBLIC_APP_URL, falling back tohttp://localhost:3001. The variable was absent from.env.example, the README Environment table, anddocs/ENVIRONMENT.md, so a production deployment that never set it emittedlocalhostcanonical/OG URLs,robots-adjacent metadata andsitemap.xmlentries — silently, with nothing in the docs to catch it.Changes
Documentation only, one variable added to the three places named in the acceptance criteria, each with a note that it must be the public origin in production:
.env.example— newNEXT_PUBLIC_APP_URL=http://localhost:3001entry, with a comment namingmetadataBase/sitemap.xmland warning that leaving it unset in production emitshttp://localhost:3001URLs.README.md— new row in the Environment table stating it is the public origin used for canonical/OG URLs andsitemap.xml, and that it must be the public origin in production.docs/ENVIRONMENT.md— same row added to the variables table. The trailing sentence said "All three areNEXT_PUBLIC_*"; with a fourth variable documented that no longer holds, so it now reads "All of them".Example production value used in the docs:
https://stellartickets.app.Scope
Deliberately limited to the acceptance criteria. I did not switch
layout.tsx/sitemap.tsover toresolveEnv()(the production guard added for #37) — that is a behaviour change belonging to that issue, and touching it here would risk conflicting with other work in flight on the same two files.Verification
npm run lintandnpx tsc --noEmitcurrently fail on this branch, but not because of this change —src/app/my-tickets/page.tsxhas a pre-existing unclosed<div>in aticket.status === 'VALID'ternary (around line 326) that is broken onmain(95c7603) and untouched here. Flagging it rather than fixing it, since it belongs to a different piece of work.🤖 Generated with Claude Code