MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / startGoServer

Function startGoServer

tooling/scripts/perf-web-runtime.mjs:251–276  ·  view source on GitHub ↗
({ vaultRoot, bind, serverBinary, configPath, disablePersistedMetaCache })

Source from the content-addressed store, hash-verified

249}
250
251function startGoServer({ vaultRoot, bind, serverBinary, configPath, disablePersistedMetaCache }) {
252 const env = {
253 ...process.env,
254 ZENNOTES_BIND: bind,
255 ZENNOTES_CONFIG_PATH: configPath,
256 ZENNOTES_VAULT_PATH: vaultRoot,
257 ZENNOTES_ALLOW_INSECURE_NOAUTH: '1',
258 ...(disablePersistedMetaCache ? { ZEN_PERF_DISABLE_PERSISTED_META_CACHE: '1' } : {})
259 }
260 const child = spawn(serverBinary, [], {
261 cwd: serverRoot,
262 env,
263 stdio: ['ignore', 'pipe', 'pipe']
264 })
265 let log = ''
266 child.stdout.on('data', (chunk) => {
267 log = appendBounded(log, chunk)
268 })
269 child.stderr.on('data', (chunk) => {
270 log = appendBounded(log, chunk)
271 })
272 return {
273 child,
274 log: () => log
275 }
276}
277
278function findChromePath() {
279 const candidates = [

Callers 1

mainFunction · 0.85

Calls 2

appendBoundedFunction · 0.70
onMethod · 0.45

Tested by

no test coverage detected