-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run both telemetry server and openmct visualizer Node.js applications through a single command #25
Comments
Edited the description. CC @traversaro |
Run openmctstaticServer as a child process of iCubTelemVizServerWe need to perform the following operations at the end of the iCubTelemVizServer server startup:
Similarly to #13 (comment), we use 'spawn' method to launch the asynchronous child process executing the command
This should be the most durable approach, as both openmctstaticServer and iCubTelemVizServer will be run by a single process as soon as iCubTelemVizServer can be installed with Notethe command |
Running "nvm use " with "spawnSync"
Analysing... |
Running "nvm use " with "spawnSync"|"execSync"NVM is a shell script function defined in
For such reason we can't just run
Note"execSync" runs an underlying "spawnSync", but unlike the later, it spawns a shell and executes the command in that shell. |
Run the
|
Further observations on the code patterns used in the implementationPaths and system dependent separatorsWe use the package const path = require('path'); For instance, the Commands sequenceA string with a sequence of commands can be defined in a multiple line assignment using the const cmdString =
'<command_A>' +
'&& <command_B>' +
'&& <command_C>'; e.g., refer to https://www.designcise.com/web/tutorial/how-to-create-multi-line-strings-in-javascript. Filtering command outputsTypically, in a sequence of commands like the one meant for loading the NVM function script, setting the Node.js version and exporting the updated NVM environment variables, since we need to get in the
Creating a new environment object Y as a copy of XThere are three ways of coying an object, by using
We apply the approach Other code references: |
This comment has been minimized.
This comment has been minimized.
Ciao @traversaro , for not making this issue too long and completing the 1rst iteration of the tool implementation, I've moved the analysis on the servers proper termination to #34. Actually, the issues we are having when closing I also checked that when we are running I will update this issue's description accordingly as well as the PR. |
Select the nodejs version in the 'openmctStaticServer' start script instead of using a child process of 'iCubTelemVizServer'.
This actually works fine! For this purpose, I did the following changes:
|
CC @S-Dafarra |
openmctStaticServer
start script instead of using a child process ofiCubTelemVizServer
(execSync
command from thechild_process
package). Run both telemetry server and openmct visualizer Node.js applications through a single command #25 (comment), Run iCub telemetry server and openMCT visualizer in one line command: Iteration 2/2 #32 .The text was updated successfully, but these errors were encountered: