Presently, the execution depends on a NodeJS instance being installed locally. The location of node / NodeJS may be configured with:
"Set the location of the nodejs executable" thisSnippet database properties jsLinkSettings nodejsPath: '/usr/bin/node' asFileReference
At the same time, the JSLink runtime can be configured like this:
After changing the configuration Lepiter needs to be restarted to pick up the new configuration.
Path segments in curly-braces, e.g.
AbstractFileReference subclass: #FileLocator
known origins. For a full list see:
FileLocator supportedOrigins sorted
Currently, the execution relies on a global instance of
LanguageLinkApplication subclass: #JSLinkApplication
40 + 2
var cwd = process.cwd(); cwd;
If you have a script that you want to keep standalone and doesn't require detailed module management, individual modules may be installed using
JSLinkApplication uniqueInstance installModule: 'MyModule'
NodeJS to provide the JS environment, which in turn uses
npm. If you want to manage the modules, e.g. update or specify versions, the environment's
package.json file should be edited directly:
JSLinkApplication uniqueInstance settings workingDirectory / 'package.json'
"Set a boolean indicating whether the server should be started in debug mode"
^ self updateProperty: #serverDebugMode value: aBooleanOrNil
If the Node.JS server is restarted for any reason, all pages that have JS snippets that have been evaluated should be closed. This is required as the page bindings will have references to JS object registry IDs that no longer exist.