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

Function loadConfig

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

Source from the content-addressed store, hash-verified

144};
145
146export const loadConfig = (): SelfHostConfig => {
147 const port = Number.parseInt(process.env.PORT ?? "4788", 10);
148 const dataDir = resolveDataDir();
149 return {
150 host: process.env.EXECUTOR_HOST ?? "127.0.0.1",
151 port,
152 dbPath: process.env.EXECUTOR_DB_PATH ?? join(dataDir, "data.db"),
153 webBaseUrl: resolveWebBaseUrl(port),
154 allowLocalNetwork: process.env.EXECUTOR_ALLOW_LOCAL_NETWORK === "true",
155 mcp20260728Enabled: process.env.MCP_2026_07_28_ENABLED !== "false",
156 authSecret: resolveAuthSecret(),
157 bootstrapAdminEmail: process.env.EXECUTOR_BOOTSTRAP_ADMIN_EMAIL,
158 bootstrapAdminPassword: process.env.EXECUTOR_BOOTSTRAP_ADMIN_PASSWORD,
159 bootstrapAdminName: process.env.EXECUTOR_BOOTSTRAP_ADMIN_NAME ?? "Admin",
160 organizationName: process.env.EXECUTOR_ORG_NAME ?? "Default",
161 orgSlug: resolveOrgSlug(),
162 sandboxTimeoutMs: resolveSandboxTimeoutMs(),
163 };
164};
165
166// A malformed value is refused rather than silently ignored: an operator who
167// sets the knob and typos it should find out at boot, not by watching a

Callers 9

startServerFunction · 0.90
makeSelfHostAppFunction · 0.90
execution.tsFile · 0.90
resolveAuthProvidersFunction · 0.90
makeAuthOptionsFunction · 0.90
buildBetterAuthFunction · 0.90
makeSelfHostTestAppFunction · 0.90

Calls 5

resolveAuthSecretFunction · 0.85
resolveSandboxTimeoutMsFunction · 0.85
resolveDataDirFunction · 0.70
resolveWebBaseUrlFunction · 0.70
resolveOrgSlugFunction · 0.70

Tested by

no test coverage detected