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

Function loadConfig

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

Source from the content-addressed store, hash-verified

142};
143
144export const loadConfig = (): SelfHostConfig => {
145 const port = Number.parseInt(process.env.PORT ?? "4788", 10);
146 const dataDir = resolveDataDir();
147 return {
148 host: process.env.EXECUTOR_HOST ?? "127.0.0.1",
149 port,
150 dbPath: process.env.EXECUTOR_DB_PATH ?? join(dataDir, "data.db"),
151 webBaseUrl: resolveWebBaseUrl(port),
152 allowLocalNetwork: process.env.EXECUTOR_ALLOW_LOCAL_NETWORK === "true",
153 authSecret: resolveAuthSecret(),
154 bootstrapAdminEmail: process.env.EXECUTOR_BOOTSTRAP_ADMIN_EMAIL,
155 bootstrapAdminPassword: process.env.EXECUTOR_BOOTSTRAP_ADMIN_PASSWORD,
156 bootstrapAdminName: process.env.EXECUTOR_BOOTSTRAP_ADMIN_NAME ?? "Admin",
157 organizationName: process.env.EXECUTOR_ORG_NAME ?? "Default",
158 orgSlug: resolveOrgSlug(),
159 sandboxTimeoutMs: resolveSandboxTimeoutMs(),
160 };
161};
162
163// A malformed value is refused rather than silently ignored: an operator who
164// 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