MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / loadConfig

Function loadConfig

apps/host-selfhost/src/config.ts:179–201  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

177};
178
179export const loadConfig = (): SelfHostConfig => {
180 const port = Number.parseInt(process.env.PORT ?? "4788", 10);
181 const dataDir = resolveDataDir();
182 const webBaseUrl = resolveWebBaseUrl(port);
183 return {
184 host: process.env.EXECUTOR_HOST ?? "127.0.0.1",
185 port,
186 dbPath: process.env.EXECUTOR_DB_PATH ?? join(dataDir, "data.db"),
187 webBaseUrl,
188 trustedOrigins: resolveTrustedOrigins(webBaseUrl),
189 allowLocalNetwork: process.env.EXECUTOR_ALLOW_LOCAL_NETWORK === "true",
190 authSecret: resolveAuthSecret(),
191 bootstrapAdminEmail: process.env.EXECUTOR_BOOTSTRAP_ADMIN_EMAIL,
192 bootstrapAdminPassword: process.env.EXECUTOR_BOOTSTRAP_ADMIN_PASSWORD,
193 bootstrapAdminName: process.env.EXECUTOR_BOOTSTRAP_ADMIN_NAME ?? "Admin",
194 organizationName: process.env.EXECUTOR_ORG_NAME ?? "Default",
195 orgSlug: resolveOrgSlug(),
196 sandboxTimeoutMs: resolveSandboxTimeoutMs(),
197 sso: resolveSso(),
198 mcpSessionIdleTtlMs: resolveMcpSessionIdleTtlMs(),
199 toolsSyncTtlMs: resolveToolsSyncTtlMs(),
200 };
201};
202
203// Well-known discovery documents for providers an operator can name without
204// hunting down the URL. Anything else (Okta, Entra, Auth0, …) has a

Callers 12

startServerFunction · 0.90
makeSelfHostAppFunction · 0.90
execution.tsFile · 0.90
resolveAuthProvidersFunction · 0.90
makeAuthOptionsFunction · 0.90
buildBetterAuthFunction · 0.90
handlers.tsFile · 0.90
makeSelfHostTestAppFunction · 0.90
sso.test.tsFile · 0.50

Calls 9

resolveTrustedOriginsFunction · 0.85
resolveAuthSecretFunction · 0.85
resolveSandboxTimeoutMsFunction · 0.85
resolveSsoFunction · 0.85
resolveToolsSyncTtlMsFunction · 0.85
resolveDataDirFunction · 0.70
resolveWebBaseUrlFunction · 0.70
resolveOrgSlugFunction · 0.70

Tested by

no test coverage detected