Using Node.js with Caché - InterSystems Documentation
Using Node.js with Caché - InterSystems Documentation
Using Node.js with Caché - InterSystems Documentation
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
2<br />
Installation<br />
This section describes the procedure for installing a pre-built cache.node module.<br />
The following components are required:<br />
• <strong>Caché</strong> installation.<br />
• <strong>Node</strong>.<strong>js</strong> version 0.4.2 (or later).<br />
<strong>Node</strong>.<strong>js</strong> is available for a number of UNIX platforms. Native support for Windows was added in version 0.6.<br />
The cache.node file is named using the <strong>Node</strong>.<strong>js</strong> .node extension for both UNIX and Windows. In the kits supplied by<br />
<strong>InterSystems</strong>, the module to be used <strong>with</strong> <strong>Node</strong>.<strong>js</strong> version 0.6 (and later) is named cache061.node. This may be renamed<br />
as the more usual cache.node name before deployment to avoid having to modify the require statement in existing<br />
<strong>Node</strong>.<strong>js</strong> software.<br />
• <strong>Node</strong>.<strong>js</strong> version 0.4.x: cache.node<br />
• <strong>Node</strong>.<strong>js</strong> version 0.6.x: cache061.node<br />
2.1 UNIX<br />
The module cache.node is actually a standard UNIX shared object (i.e. cache.so) but <strong>with</strong> an unusual <strong>Node</strong>.<strong>js</strong>-specific file<br />
extension.<br />
Copy cache.node to the following location in the node file system:<br />
.../node/lib/node/<br />
For example:<br />
/opt/local/node/lib/node/cache.node<br />
Placing the module in the recognized library path will remove the need to specify the full path in the JavaScript files. For<br />
example, in JavaScript, it will be possible to write:<br />
var globals = require(‘cache');<br />
Instead of (for example):<br />
var globals = require('/opt/local/build/default/cache');<br />
<strong>Using</strong> <strong>Node</strong>.<strong>js</strong> <strong>with</strong> <strong>Caché</strong> 5