MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / startRuntimeNodeCli

Function startRuntimeNodeCli

projects/runtime-node/src/cli.ts:196–204  ·  view source on GitHub ↗
(args: string[] = process.argv.slice(2), env: NodeJS.ProcessEnv = process.env)

Source from the content-addressed store, hash-verified

194}
195
196export async function startRuntimeNodeCli(args: string[] = process.argv.slice(2), env: NodeJS.ProcessEnv = process.env): Promise<RuntimeNodeHttpServer> {
197 if (args[0] !== "serve") {
198 throw new Error("Usage: runtime-node serve [--host HOST] [--port PORT] [--token TOKEN]")
199 }
200
201 const server = await startRuntimeNodeServe(parseRuntimeNodeServeConfig(args, env))
202 console.log(`Runtime listening at ${server.url}`)
203 return server
204}
205
206if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
207 startRuntimeNodeCli().catch((error) => {

Callers 1

cli.tsFile · 0.85

Calls 2

startRuntimeNodeServeFunction · 0.85

Tested by

no test coverage detected