Getting started

After you install, configure, and set the required environment variables for Open Enterprise SDK for Node.js application, you can run your Node.js application.

All Open Enterprise SDK for Node.js applications are run in the same way:
  1. Invoke the Open Enterprise SDK for Node.js runtime executable.
  2. Supply the name of the required application.
For example, you can use the following command to run an Open Enterprise SDK for Node.js application:
$ node myapplication.js

If you want the Open Enterprise SDK for Node.js runtime binary file to be invoked when your system starts, you can create a startup (shell) script that is called during system startup.

More arguments can be supplied to your application by appending them to the invocation command. For example:
$ node applicationexample.js arg1 arg2
Each of the arguments is available to your application by using the process.argv array.
  • The first element in the array (process.argv[0]) is the name of the Open Enterprise SDK for Node.js runtime binary file: node.
  • The second element in the array (process.argv[1]) is the name of the Open Enterprise SDK for Node.js application script. In this example, process.argv[1] has the value applicationexample.js.
  • Any remaining elements in the array correspond to the arguments that are supplied on the command line; in the example, process.argv[2] contains arg1, and process.argv[3] contains arg2.