All users may view details of a Node.js service. Expand the tree below a node instance in the Node Instances section of the navigation on the left. Then, navigate to a Node.js service entry below the sub-navigation item Node.js. The tab Node.js Service is initially displayed.
Figure: Node.js Service Details
In the Status section, the status of the node.js service (Running or Stopped) is displayed. Here you can start, stop, delete, or kill the service.
- Stopping the service
Bridge 7.2.0 Clicking Stop will send
SIGTERMto the service.
Older Bridges called Java Process.destroy().
- Killing the service
Bridge 7.2.0 The Kill functionality will first try to regularly stop the service. When the service is still running after 10 seconds, it will forcibly terminate the service with Java Process.destroyForcibly().
If the service is up and running, you can see the system process id (PID) of the service. To match the PID with the Bridge service, you can also use system commands: Run with administration privileges:
System Command / Output Linux
... 15228 ... /opt/e2e_bridge_prog/nodejs-8.11.4/linux-64/node index.js --instance /opt/e2e_bridge_data/nodejs_NodeService
... 15265 ... /opt/e2e_bridge_prog/nodejs-8.11.4/linux-64/node app.js --instance /opt/e2e_bridge_data/nodejs_api-test-helloworld_43
... 15853 ... /opt/e2e_bridge_prog/j2re-11.0.2/linux-64/bin/java -jar repository.jar --instance /opt/e2e_bridge_data/java_helloworld
...,bridgeserver.exe,"C:\E2E_BRIDGE_PROG\bridgeserver-2018.12\win32-64\bridgeserver.exe" --config "C:\var\E2E_BRIDGE_DATA\server.cfg" --instance "C:\var\E2E_BRIDGE_DATA\bridge_SoapWait",17600
...,node.exe,C:\E2E_BRIDGE_PROG\nodejs-8.11.4\win32-64\node app.js "--instance C:\var\E2E_BRIDGE_DATA\nodejs_api-test-helloworld",20144
If the service is up and running, you can see the system process id (PID) of the service. To match the PID with the Bridge service, you can also use system commands:
Run with administration privileges:
A Node.js service can have dependencies to other packages. Click Run to execute npm install to refresh dependent packages.
As per default, this 'npm install' does not run installer scripts. Check run scripts, if you want to execute npm installer scripts, but be aware of the fact that running scripts is a security vulnerability.
To inspect the logs of the 'npm install' command, switch to the deployed service and go to tab Logging (see also Logging of Node.js Services).
In the Details section, the following information is displayed:
|Version||Version of the Node.js service as specified in package.json.|
|Description||Description of the Node.js service as specified in package.json.|
|Start Script||Start Script of the Node.js service as specified in package.json.|
In the Preferences section, the following preferences can be modified:
Select this option, if you want the service to startup automatically, whenever the Bridge is started. Only users who are member of a group, to which the role ADMIN has been assigned, are allowed to change this option.
|Automatic Restart||Whenever the service crashes, it will restart immediately. Nevertheless, in the navigation the icon next to the xUML service name will indicate the abnormal termination.|
Also consider the implications of Minimum Uptime in Seconds when setting this option.
|Minimum Uptime in Seconds|
To allow the Bridge to distinct whether the service has crashed during start-up or not, specify the minimum uptime of the Node.js service in seconds.
|UI URL||Specify the URL of the user interface of the Node.js service. It then will be displayed as an additional tab within the Bridge and you can access it directly via the Bridge.|
|UI Tab Title||If the Node.js service has a user interface that is integrated to the Bridge, you can specify the title of the tab here. The default title is User Interface.|
The group id of the user who has deployed the service. Only users who are member of a group, to which the role ADMIN has been assigned, are allowed to modify the owner of the service.
Each Node.js service runs with a specific set of environment variables which is provided by the operating system. They can be added and changed on tab Environment Variables (see Setting Environment Variables for Node.js Services). Additionally, the Bridge provides environment variables that are strongly recommended to be used by developers in their code (see Developing Node.js Services):
Node.js service port
Path to the configuration directory of the service (within the working directory of the service).
If you use the e2e-conf Node.js module, you can initialize e2e-conf with E2E_CONF_ROOT. This is especially useful if your e2e-conf is not a top level dependency but a sub-module dependency.
If the Node.js service writes log files in this directory, you can view them in the Bridge.
Do not use the following prefixes: start, stdout, stderr and transaction. They are reserved prefixes by the Bridge.
These special environment variables are listed on the service details tab.
Switch to the History tab to view the history of all user actions that were executed on the selected Node.js service since its deployment.
In the Node.js service history all user actions are listed - comprising starting and stopping the service, modification of the preferences, etc. The list is sorted in a chronological order and also shows the user who initiated the action.
The history also lists internal actions, for instance, when the system started or stopped a Node.js service automatically.
All users have access to the history information.
Figure: Node.js Service History