Configuring and Installing Node.js
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 and keep up to date for you through the
Install Node.js and update packages.
How it works. The helper provisions the Node.js runtime the server-side engine needs, so headless dashboard rendering works without a manual install.
StiNodeJs helper.Install Node.js and update packages.
nodejs = StiNodeJs()
# Optionally point at an existing install / working directory
# nodejs.binDirectory = '/usr/bin/nodejs'
# nodejs.workingDirectory = ''
result = nodejs.installNodeJS()
if result:
result = nodejs.updatePackages()
message = 'The installation was successful.' if result else nodejs.errornodejs.installNodeJS()— downloads and installs Node.js; returns false on failure.nodejs.updatePackages()— installs or updates the Stimulsoft Node.js packages to the current version.
How it works. The helper provisions the Node.js runtime the server-side engine needs, so headless dashboard rendering works without a manual install.