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

Function loadConfig

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

Source from the content-addressed store, hash-verified

186};
187
188export const loadConfig = (): SelfHostConfig => {
189 const port = Number.parseInt(process.env.PORT ?? "4788", 10);
190 const dataDir = resolveDataDir();
191 const webBaseUrl = resolveWebBaseUrl(port);
192 return {
193 host: process.env.EXECUTOR_HOST ?? "127.0.0.1",
194 port,
195 dbPath: process.env.EXECUTOR_DB_PATH ?? join(dataDir, "data.db"),
196 webBaseUrl,
197 trustedOrigins: resolveTrustedOrigins(webBaseUrl),
198 allowLocalNetwork: process.env.EXECUTOR_ALLOW_LOCAL_NETWORK === "true",
199 authRateLimit: process.env.EXECUTOR_DISABLE_AUTH_RATE_LIMIT !== "true",
200 authSecret: resolveAuthSecret(),
201 bootstrapAdminEmail: process.env.EXECUTOR_BOOTSTRAP_ADMIN_EMAIL,
202 bootstrapAdminPassword: process.env.EXECUTOR_BOOTSTRAP_ADMIN_PASSWORD,
203 bootstrapAdminName: process.env.EXECUTOR_BOOTSTRAP_ADMIN_NAME ?? "Admin",
204 organizationName: process.env.EXECUTOR_ORG_NAME ?? "Default",
205 orgSlug: resolveOrgSlug(),
206 sandboxTimeoutMs: resolveSandboxTimeoutMs(),
207 sso: resolveSso(),
208 mcpSessionIdleTtlMs: resolveMcpSessionIdleTtlMs(),
209 toolsSyncTtlMs: resolveToolsSyncTtlMs(),
210 };
211};
212
213// Well-known discovery documents for providers an operator can name without
214// 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