2022-07-07 01:13:02 +00:00
|
|
|
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 =
|
2022-07-12 14:32:27 +00:00
|
|
|
process.env.NEXT_PUBLIC_WEBAPP_URL || VERCEL_URL || RAILWAY_STATIC_URL || HEROKU_URL;
|
2022-03-26 00:39:38 +00:00
|
|
|
/** @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-07-06 19:31:07 +00:00
|
|
|
export const IS_SELF_HOSTED = !(
|
2022-07-11 23:46:47 +00:00
|
|
|
new URL(WEBAPP_URL).hostname.endsWith(".cal.dev") || new URL(WEBAPP_URL).hostname.endsWith(".cal.com")
|
2022-07-06 19:31:07 +00:00
|
|
|
);
|
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}`;
|
2022-08-08 19:39:51 +00:00
|
|
|
export const LOGO = "/calcom-logo-white-word.svg";
|
2022-07-01 17:19:52 +00:00
|
|
|
export const LOGO_ICON = "/cal-com-icon-white.svg";
|
|
|
|
export const ROADMAP = "https://cal.com/roadmap";
|
2022-08-17 09:07:19 +00:00
|
|
|
export const DESKTOP_APP_LINK = "https://cal.com/download";
|
2022-07-01 17:19:52 +00:00
|
|
|
export const JOIN_SLACK = "https://cal.com/slack";
|
2022-08-05 18:44:30 +00:00
|
|
|
export const POWERED_BY_URL = `${WEBSITE_URL}/?utm_source=embed&utm_medium=powered-by-button`;
|
2022-07-01 17:19:52 +00:00
|
|
|
export const DOCS_URL = "https://docs.cal.com";
|
2022-08-22 20:56:55 +00:00
|
|
|
export const DEVELOPER_DOCS = "https://developer.cal.com";
|
2022-07-01 17:19:52 +00:00
|
|
|
export const SEO_IMG_DEFAULT = `${WEBSITE_URL}/og-image.png`;
|
|
|
|
export const SEO_IMG_OGIMG = "https://og-image-one-pi.vercel.app/";
|
|
|
|
export const SEO_IMG_OGIMG_VIDEO = `${WEBSITE_URL}/video-og-image.png`;
|