MCPcopy Create free account
hub / github.com/pollinations/pollinations / appContext

Function appContext

apps/_scripts/deploy-app.js:333–348  ·  view source on GitHub ↗
(appName)

Source from the content-addressed store, hash-verified

331}
332
333function appContext(appName) {
334 const config = JSON.parse(
335 fs.readFileSync(path.join(__dirname, "../apps.json"), "utf8"),
336 );
337 const appConfig = config[appName];
338 if (!appConfig) throw new Error(`App ${appName} not found in apps.json`);
339
340 const subdomain = appConfig.subdomain || appName;
341 return {
342 appConfig,
343 subdomain,
344 project: `apps-${subdomain}`,
345 originDomain: `${subdomain}.${UPSTREAM_ZONE}`,
346 publicDomain: `${subdomain}.${PUBLIC_ZONE}`,
347 };
348}
349
350async function runOrigin(appName) {
351 const { appConfig, project, originDomain } = appContext(appName);

Callers 2

runOriginFunction · 0.85
runCutoverFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected