MCPcopy
hub / github.com/fosrl/pangolin / startServers

Function startServers

server/index.ts:29–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27import { startRebuildQueueProcessor } from "@server/lib/rebuildClientAssociations";
28
29async function startServers() {
30 await setHostMeta();
31
32 await config.initServer();
33
34 license.setServerSecret(config.getRawConfig().server.secret!);
35 await license.check();
36
37 await runSetupFunctions();
38
39 await fetchServerIp();
40
41 initTelemetryClient();
42
43 initLogCleanupInterval();
44 initAcmeCertSync();
45 startRebuildQueueProcessor();
46
47 // Start all servers
48 const apiServer = createApiServer();
49 const internalServer = createInternalServer();
50
51 const nextServer = await createNextServer();
52 if (config.getRawConfig().traefik.file_mode) {
53 const monitor = new TraefikConfigManager();
54 await monitor.start();
55 }
56
57 let integrationServer;
58 if (config.getRawConfig().flags?.enable_integration_api) {
59 integrationServer = createIntegrationApiServer();
60 }
61
62 await initCleanup();
63
64 return {
65 apiServer,
66 nextServer,
67 internalServer,
68 integrationServer
69 };
70}
71
72// Types
73declare global {

Callers 1

index.tsFile · 0.85

Calls 15

startMethod · 0.95
setHostMetaFunction · 0.90
runSetupFunctionsFunction · 0.90
fetchServerIpFunction · 0.90
initTelemetryClientFunction · 0.90
initLogCleanupIntervalFunction · 0.90
initAcmeCertSyncFunction · 0.90
createApiServerFunction · 0.90
createInternalServerFunction · 0.90
createNextServerFunction · 0.90

Tested by

no test coverage detected