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:
- Invoke the Open Enterprise SDK for Node.js runtime executable.
- Supply the name of the required application.
$ node myapplication.jsIf 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 arg2Each 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 valueapplicationexample.js. - Any remaining elements in the array correspond to the arguments that are
supplied on the command line; in the example,
process.argv[2]containsarg1, andprocess.argv[3]containsarg2.