Tag: 桥梁

节点JS Trireme包括模块

我使用Java中的https://github.com/apigee/trireme在JVM中运行Node JS。 我有一个如下所示的目录: node/ -test_file.js -test_somemodule.js -somemodule/ -somemodule/index.js -somemodule/… 使用下面的代码运行test_file.js没有问题: @Test public void shouldRunTestScript() { try { NodeEnvironment env = new NodeEnvironment(); // Pass in the script file name, a File pointing to the actual script, and an Object[] containg "argv" NodeScript script = env.createScript("my-test-script.js", new File(Settings.getInstance().getNodeDir() + "/my-test-script.js"), null); // Wait for the script […]