MCPcopy Create free account
hub / github.com/AnswerOverflow/AnswerOverflow / getBaseUrl

Function getBaseUrl

packages/constants/src/links.ts:25–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23export const WAITLIST_URL = 'https://forms.gle/6YLPPGi8X2DCr29T7';
24
25export const getBaseUrl = () => {
26 const base =
27 // eslint-disable-next-line n/no-process-env
28 process.env.NEXT_PUBLIC_SITE_URL ??
29 // eslint-disable-next-line n/no-process-env
30 (process.env.NODE_ENV !== 'development'
31 ? 'https://www.answeroverflow.com'
32 : 'http://localhost:3000');
33 return base.endsWith('/') ? base.slice(0, -1) : base;
34};
35
36export const getMainSiteHostname = () => {
37 const url = new URL(getBaseUrl());

Callers 2

getMainSiteHostnameFunction · 0.70
makeMainSiteLinkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected