MCPcopy Index your code
hub / github.com/simstudioai/sim / getBaseUrl

Function getBaseUrl

apps/sim/lib/core/utils/urls.ts:26–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24 * @throws Error if NEXT_PUBLIC_APP_URL is not configured
25 */
26export function getBaseUrl(): string {
27 const baseUrl = getEnv('NEXT_PUBLIC_APP_URL')?.trim()
28
29 if (!baseUrl) {
30 throw new Error(
31 'NEXT_PUBLIC_APP_URL must be configured for webhooks and callbacks to work correctly'
32 )
33 }
34
35 return normalizeBaseUrl(baseUrl)
36}
37
38/**
39 * Returns the base URL used by server-side internal API calls.

Callers 15

isSelfOriginUrlFunction · 0.90
executeToolRequestFunction · 0.90
getDefaultHeadersFunction · 0.90
EmailFooterFunction · 0.90
EmailLayoutFunction · 0.90
ExistingAccountEmailFunction · 0.90
WelcomeEmailFunction · 0.90
InvitationEmailFunction · 0.90
CreditPurchaseEmailFunction · 0.90
PlanWelcomeEmailFunction · 0.90

Calls 2

getEnvFunction · 0.90
normalizeBaseUrlFunction · 0.70

Tested by

no test coverage detected