2022-03-26 00:39:38 +00:00
|
|
|
export const WEBAPP_URL = process.env.NEXT_PUBLIC_WEBAPP_URL || `https://${process.env.VERCEL_URL}`;
|
|
|
|
/** @deprecated use `WEBAPP_URL` */
|
|
|
|
export const BASE_URL = WEBAPP_URL;
|
|
|
|
export const WEBSITE_URL = process.env.NEXT_PUBLIC_WEBSITE_URL || "https://cal.com";
|
2022-05-30 07:57:48 +00:00
|
|
|
|
|
|
|
// This is the URL from which all Cal Links and their assets are served.
|
|
|
|
// Use website URL to make links shorter(cal.com and not app.cal.com)
|
|
|
|
// As website isn't setup for preview environments, use the webapp url instead
|
|
|
|
export const CAL_URL = new URL(WEBAPP_URL).hostname.endsWith(".vercel.app") ? WEBAPP_URL : WEBSITE_URL;
|
|
|
|
|
2022-06-02 19:49:12 +00:00
|
|
|
export const CONSOLE_URL =
|
|
|
|
new URL(WEBAPP_URL).hostname.endsWith(".cal.dev") || process.env.NODE_ENV !== "production"
|
|
|
|
? `https://console.cal.dev`
|
|
|
|
: `https://console.cal.com`;
|
2022-05-06 15:56:26 +00:00
|
|
|
export const EMBED_LIB_URL = process.env.NEXT_PUBLIC_EMBED_LIB_URL || `${WEBAPP_URL}/embed/embed.js`;
|
2022-03-09 22:56:05 +00:00
|
|
|
export const IS_PRODUCTION = process.env.NODE_ENV === "production";
|
|
|
|
export const TRIAL_LIMIT_DAYS = 14;
|
|
|
|
export const HOSTED_CAL_FEATURES = process.env.HOSTED_CAL_FEATURES || BASE_URL === "https://app.cal.com";
|
2022-03-26 00:39:38 +00:00
|
|
|
/** @deprecated use `WEBAPP_URL` */
|
|
|
|
export const NEXT_PUBLIC_BASE_URL = process.env.NEXT_PUBLIC_WEBAPP_URL || `https://${process.env.VERCEL_URL}`;
|