Configuring and Installing NodeJs
Our sample projects and report templates can help you learn the basics of working with our products.The server-side engine relies on Node.js, which the SDK can install for you. This example installs Node.js and updates the required packages.
Code overview. Load or create the report, resolve the target component or option, apply the requested properties, and render the updated result.
Code overview. Load or create the report, resolve the target component or option, apply the requested properties, and render the updated result.
$nodejs = new StiNodeJs();
$result = $nodejs->installNodeJS();
if ($result)
$result = $nodejs->updatePackages();
echo $result ? 'The installation was successful.' : $nodejs->error;new StiNodeJs()— the helper that manages the local Node.js runtime used for server-side rendering.installNodeJS()— downloads and configures a local Node.js runtime.updatePackages()— installs or updates the Stimulsoft npm packages the engine needs.
StiNodeJs downloads and configures a local Node.js runtime and the Stimulsoft packages needed for server-side rendering, so you can prepare the environment from PHP without manual setup.