Page History
...
- Node.js® is an open source, cross-platform JavaScript run-time environment and is a frequently used scripting language available for Linux, MacOS, Windows, and other platforms.
- This article explains how to include Node.js® scripts with JS7 job scripts- Shell Jobs. Use of Node.js® from the OS Shell is different from use of JS7 - JavaScript Jobs.
- As a prerequisite to executing Node.js® code it is required to install Node.js on the server for which the JS7 Agent is operated.
...
- Find the below examples for download (upload .json upload): run-Node.js-unix.workflow.json
In order to directly run Node.js® script code from a JS7 shell job script, the recommended approach is to use a shebang that runs Node.js® as the interpreter of the script like this:
Code Block language js title Example how run Node.js® script code with a shebang linenumbers true #!/usr/bin/node var name =(process.env.name); var num = parseInt(process.env.num); //print value of variable console.log( name); console.log( num);
Alternatively, the Node.js® script can be executed from a file that has to be located within reach of the JS7 Agent that runs the job:
Code Block language js title Example how to run Node.js® script from a file linenumbers true node /some/location/JS7-2.5.1/demo_Node.js
...
Overview
Content Tools