bBox_JavaScriptNode( mode; text; script {; param1; ...} )
Parameters: mode: 4 = run asynchronously (don't wait for output) 16 = use alternate installation path for node executable (version 0.99.8+) 64 = expand .zip files, passing the path to the directory instead (should not be used for the main script parameter) text: sent to NodeJS' stdin script: path or container reference of the main script text …: additional parameters for the node command.
Result: output returned by JavaScript as text Error: bBox_LastError ("js")
Script Step: none
––––––––––
First appeared in: 0.99
Examples in demo file: 10
Compatibility: Client, macOS, Server, WebDirect, WPE
––––––––––
NOTE: parameters may change in a future version
Execute the script file, either provided as a container reference or a POSIX file path, using FMS' NodeJS environment.
To avoid complicating the FileMaker Server deployment, best to either install any node packages outside of the FMS directories, or supply any needed libraries using container files.
Typically server-side only. However, may be used locally if both FileMaker Pro and Server are installed on the system, or the Alternate Path mode is set and NodeJS is installed at /usr/local/bin (macOS) or /usr/bin (Ubuntu). This function is session and thread safe.
See Node.js v14.19.1 documentation for information on node parameters.
When debugging it may be useful to use a mode of +32 to catch output to stderr.
––––––––––