Skip to content

Commit

Permalink
Added NEXT_PUBLIC_VERCEL and NEXT_PUBLIC_VERCEL_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-tey committed Aug 27, 2022
1 parent 09da65d commit 6860ad7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NEXT_PUBLIC_VERCEL=${VERCEL}
NEXT_PUBLIC_VERCEL_URL=${VERCEL_URL}
4 changes: 2 additions & 2 deletions components/link-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export default function LinkCard({
url: string;
}) {
const shortURL = `${
process.env.VERCEL === "1"
? process.env.VERCEL_URL
process.env.NEXT_PUBLIC_VERCEL === "1"
? process.env.NEXT_PUBLIC_VERCEL_URL
: "http://localhost:3000"
}/${key}`; // if you're self-hosting you can just replace this with your own domain

Expand Down

0 comments on commit 6860ad7

Please sign in to comment.