Run a detached child process in Deno
I'm looking at running a detached child process using Deno. Specifically I want run something like a script or a web server without needing the parent Deno command staying open.
In node I can achieve it using
When the parent node command terminates, the child process will continue running.
In Deno the equivalent would be something like this
In Deno though as soon as
In node I can achieve it using
spawn doing something like this. When the parent node command terminates, the child process will continue running.
In Deno the equivalent would be something like this
In Deno though as soon as
unref is called, the parent deno command terminates which then kills the child process. Is there a way using Deno to achieve the equivalent behaviour I can achieve in node?