Skip to content

Commit

Permalink
fix: adds new constants fallbacks for railway and heroku apps (calcom…
Browse files Browse the repository at this point in the history
  • Loading branch information
agustif authored Jul 7, 2022
1 parent 13528ad commit 8ca6270
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/lib/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
export const WEBAPP_URL = process.env.NEXT_PUBLIC_WEBAPP_URL || `https://${process.env.VERCEL_URL}`;
const VERCEL_URL = process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : "";
const RAILWAY_STATIC_URL = process.env.RAILWAY_STATIC_URL ? `https://${process.env.RAILWAY_STATIC_URL}` : "";
const HEROKU_URL = process.env.HEROKU_APP_NAME ? `https://${process.env.HEROKU_APP_NAME}.herokuapp.com` : "";
export const WEBAPP_URL =
process.env.NEXT_PUBLIC_WEBAPP_URL ||
VERCEL_URL ||
RAILWAY_STATIC_URL ||
HEROKU_URL;
/** @deprecated use `WEBAPP_URL` */
export const BASE_URL = WEBAPP_URL;
export const WEBSITE_URL = process.env.NEXT_PUBLIC_WEBSITE_URL || "https://cal.com";
Expand Down

0 comments on commit 8ca6270

Please sign in to comment.