MCPcopy
hub / github.com/21st-dev/1code / getBaseUrl

Function getBaseUrl

src/main/index.ts:83–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81// In packaged app, ALWAYS use production URL to prevent localhost leaking into releases
82// In dev mode, allow override via MAIN_VITE_API_URL env variable
83export function getBaseUrl(): string {
84 if (app.isPackaged) {
85 return "https://21st.dev"
86 }
87 return import.meta.env.MAIN_VITE_API_URL || "https://21st.dev"
88}
89
90export function getAppUrl(): string {
91 return process.env.ELECTRON_RENDERER_URL || "https://21st.dev/agents"

Callers 4

registerIpcHandlersFunction · 0.90
sandbox-import.tsFile · 0.90
handleAuthCodeFunction · 0.85
index.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected