That is because the backgrounded process runs in a subshell. To do what you want you could do this:
bash -c 'node process.js 1>$LOGFOLDER.$$.log' &
That is because the backgrounded process runs in a subshell. To do what you want you could do this:
bash -c 'node process.js 1>$LOGFOLDER.$$.log' &