Mitsunee / fgo-timers

Fansite for the global version of Fate/Grand Order with Event Timers, info on future Upgrades, Interludes, Rank Ups, Login Exchange Tickets and Calculators
https://fgo.mitsunee.com
7 stars 1 forks source link

Use VERCEL_URL env var #90

Closed Mitsunee closed 1 year ago

Mitsunee commented 1 year ago

vercel already exposes process.env.VERCEL_URL which can be used as NEXT_PUBLIC_VERCEL_URL in <Meta>. The current env var could be used as an override and there should probably also be a fallback for development using process.env.port

may implement an mjs script similar to what create-t3-app does to verify env vars or set defaults (with logging warnings)

EDIT: I asked at vercel and process.env.VERCEL_URL does not contain assigned domains, so that will require an addition env var with VERCEL_URL as fallback.