You can directly deploy the repository of a Node.js service to a node instance via the Bridge.
Deploying a Node.js Service Repository via the Bridge
Only users who are member of a group, to which the role ADMIN or MODELER has been assigned, are allowed to deploy Node.js services. Users, who have only MODELER access rights, may only replace a Node.js service, if they themselves or a member of the same group deployed it.
Select the navigation item Deployment in the Domain section of the navigation on the left to deploy a new service or overwrite an existing one.
Browse for the repository of a Node.js service by clicking Browse. This repository has to be provided as a ZIP file and it's structure is explained further below.
|Overwrite Service||If the Node.js service you want to deploy already exists, check this option, if you want to overwrite it.|
|Startup Service||To run, the Node.js service has to be started. Select this option, if you want the Node.js service to be started automatically right after its deployment.|
|Run 'npm install'|
Select this option, if you want to run an 'npm install' after service deployment to get dependent Node.js packages (see Structure of a Node.js Service Repository further below).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.
|Preserve node_modules||Upon deployment of a Node.js service, the modules folder will get deleted, if existent. By setting this option you can keep these folders.|
This can be useful , if you do not want to perform an npm install on deployment.
|Instance Name||You can overwrite the Node.js service name here. This is helpful, if you e.g. want to deploy the very same service multiple times with different names.|
After you have set the deployment options, deploy the service by clicking Upload.
If you have deployed a new service, it will be displayed in the navigation on the left, below the node instance, to which it has been deployed.
Target Directory of the Deployment
Node.js services get deployed to a folder nodejs_<name of the service> in the Bridge data directory of the node instance. This folder contains a sub-folder logs to store the logs in and a sub-folder repository which contains the java script file of the service and the package.json.