MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / isMainModule

Function isMainModule

tools/model-gateway/server.mjs:1018–1022  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1016}
1017
1018function isMainModule() {
1019 const currentFile = fileURLToPath(import.meta.url)
1020 const entry = process.argv[1] ? path.resolve(process.argv[1]) : ''
1021 return currentFile === entry
1022}
1023
1024if (isMainModule()) {
1025 startGatewayServer()

Callers 1

server.mjsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected