JavaScript for Node.js Programmer’s Checklist

When developing eFTL JavaScript programs for Node.js environments, remember these steps.

Code

  • JavaScript programs must require the TIBCO eFTL library package, TIBCO_HOME/eftl/version/sdks/javascript/lib/eftl.js.
    var eftl = require('eftl')
  • If you run a secure eFTL service, which listens using wss protocol, the program must register the appropriate certificates that the application trusts. If the program does not register certificates, then it trusts any certificate. (The JavaScript method that registers certificates applies only when running in a Node.js environment. It is not effective when running in a browser.)

Run

  • eFTL programs require that the WebSocket module is installed in the Node.js environment.
    Install it using this command line:
    npm install ws
  • Ensure that the TIBCO FTL server is running, and provides a TIBCO eFTL service.
  • If your application communicates over EMS channels, ensure that the TIBCO EMS server is running, and that each TIBCO eFTL service can connect to it.
  • If your application uses FTL durables, ensure that persistence stores are configured, running, and reachable.
  • Ensure that each eFTL client can connect to a TIBCO eFTL service.
  • Ensure that the file eftl.js is available in the environment.