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

Function getSocketUrl

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

Source from the content-addressed store, hash-verified

189 * 3. `http://localhost:3002` for local development and SSR.
190 */
191export function getSocketUrl(): string {
192 const explicit = getEnv('NEXT_PUBLIC_SOCKET_URL')?.trim()
193 if (explicit) return explicit
194
195 const browserOrigin = getBrowserOrigin()
196 if (browserOrigin && !LOCALHOST_HOSTNAMES.has(new URL(browserOrigin).hostname)) {
197 return browserOrigin
198 }
199
200 return DEFAULT_SOCKET_URL
201}
202
203/**
204 * Returns the Ollama server URL.

Callers 2

urls.test.tsFile · 0.90
initializeSocketFunction · 0.90

Calls 2

getEnvFunction · 0.90
getBrowserOriginFunction · 0.85

Tested by

no test coverage detected