Like Ruby 'exec', but for Node.js?

I am looking for a command such as Ruby kernel 'exec', but for Node.js. Any thoughts?

+4
source share
2 answers

I took @phs advice and built my own Node.js module. A few details can be found here . Github source here .

You can use it like this:

npm install kexec

 var kexec = require('kexec'); kexec("your_process with args here"); 
+6
source

If you only care about posix platforms, you can create a small C module and go down to exec .

For some pointers to how you can do this, first make sure that node is a framework that runs on top of v8 , and then take a look at that or maybe.

+5
source

Source: https://habr.com/ru/post/1384402/


All Articles