diff --git a/.env.example b/.env.example index 19b5af3..72fb271 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,5 @@ +NEXT_PUBLIC_APP_URL=http://localhost:3000 + # ----------------------------------------------------------------------------- # Authentication (NextAuth.js) # ----------------------------------------------------------------------------- @@ -6,7 +8,6 @@ NEXTAUTH_SECRET= GITHUB_CLIENT_ID= GITHUB_CLIENT_SECRET= - GITHUB_ACCESS_TOKEN= # ----------------------------------------------------------------------------- diff --git a/lib/utils.ts b/lib/utils.ts index 13355eb..a17582e 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -14,7 +14,6 @@ export function formatDate(input: string | number): string { }) } -// Since we're already setting NEXTAUTH_URL, we can use same to create absolute URLs. export function absoluteUrl(path: string) { - return `${process.env.NEXTAUTH_URL}${path}` + return `${process.env.NEXT_PUBLIC_APP_URL}${path}` }