Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

run another process on nodejs process exit

const spawn = require('child_process').spawn;

process.on('exit', () => {
   const child = spawn('node', ['some_other_script.js'], {
      detached: true,
      stdio: 'ignore'
   });

   child.unref();
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: svelte on destroy 
Javascript :: von click 
Javascript :: Open props 
Javascript :: Get Country from the international phone number 
Javascript :: super in javascript 
Javascript :: get date in format 
Javascript :: how to convert string to pascal case in javascript 
Javascript :: import bootstrap 4 in react 
Javascript :: Hide ReactTooltip after hover off 
Javascript :: html select multiple selected values 
Javascript :: call vue function at element load 
Javascript :: javascript getHours from epoch 
Javascript :: push notification react native 
Javascript :: codeceptjs "waitForClickable" 
Javascript :: reactjs svg SyntaxError: unknown: Namespace tags are not supported by default 
Javascript :: setTimeout() nodejs 
Javascript :: angular cli spec test false 
Javascript :: gsap keyframes 
Javascript :: switch statement in javascript 
Javascript :: javascript get user from api 
Javascript :: jquery add event to dynamically created element 
Javascript :: dates in javascript 
Javascript :: find all even numbers javascript 
Javascript :: java script append element to array 
Javascript :: puppeteer example multiple file upload 
Javascript :: chaining async await 
Javascript :: radio button schema mongoose 
Javascript :: function hoisting in js 
Javascript :: formgroup angular 
Javascript :: cogo toast 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =