MCPcopy Create free account
hub / github.com/astercloud/aster / NewNodeJSRuntime

Function NewNodeJSRuntime

pkg/tools/bridge/runtime.go:353–367  ·  view source on GitHub ↗

NewNodeJSRuntime 创建 Node.js 运行时

(config *RuntimeConfig)

Source from the content-addressed store, hash-verified

351
352// NewNodeJSRuntime 创建 Node.js 运行时
353func NewNodeJSRuntime(config *RuntimeConfig) *NodeJSRuntime {
354 if config == nil {
355 config = DefaultRuntimeConfig()
356 }
357
358 nodePath := "node"
359 if path, err := exec.LookPath("node"); err == nil {
360 nodePath = path
361 }
362
363 return &NodeJSRuntime{
364 config: config,
365 nodePath: nodePath,
366 }
367}
368
369func (r *NodeJSRuntime) Language() Language {
370 return LangNodeJS

Callers 2

NewRuntimeManagerFunction · 0.85

Calls 1

DefaultRuntimeConfigFunction · 0.85

Tested by 1