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

Function loadConfig

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

Source from the content-addressed store, hash-verified

134};
135
136export const loadConfig = (): SelfHostConfig => {
137 const port = Number.parseInt(process.env.PORT ?? "4788", 10);
138 const dataDir = resolveDataDir();
139 return {
140 host: process.env.EXECUTOR_HOST ?? "127.0.0.1",
141 port,
142 dbPath: process.env.EXECUTOR_DB_PATH ?? join(dataDir, "data.db"),
143 webBaseUrl: resolveWebBaseUrl(port),
144 allowLocalNetwork: process.env.EXECUTOR_ALLOW_LOCAL_NETWORK === "true",
145 authSecret: resolveAuthSecret(),
146 bootstrapAdminEmail: process.env.EXECUTOR_BOOTSTRAP_ADMIN_EMAIL,
147 bootstrapAdminPassword: process.env.EXECUTOR_BOOTSTRAP_ADMIN_PASSWORD,
148 bootstrapAdminName: process.env.EXECUTOR_BOOTSTRAP_ADMIN_NAME ?? "Admin",
149 organizationName: process.env.EXECUTOR_ORG_NAME ?? "Default",
150 orgSlug: resolveOrgSlug(),
151 };
152};
153
154// The org slug doubles as a URL segment (`/<slug>/policies`), so an
155// operator-set value must fit the shared grammar and avoid reserved root

Callers 8

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

Calls 4

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

Tested by

no test coverage detected