first
This commit is contained in:
commit
8538ab969a
434 changed files with 44051 additions and 0 deletions
9
packages/utils/lib/base-url.ts
Normal file
9
packages/utils/lib/base-url.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
export function getBaseUrl() {
|
||||
if (process.env.NEXT_PUBLIC_SITE_URL) {
|
||||
return process.env.NEXT_PUBLIC_SITE_URL;
|
||||
}
|
||||
if (process.env.NEXT_PUBLIC_VERCEL_URL) {
|
||||
return `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`;
|
||||
}
|
||||
return `http://localhost:${process.env.PORT ?? 3000}`;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue