0.0.1 • Published 2 years ago

demon v0.0.1

Weekly downloads
36
License
ISC
Repository
github
Last release
2 years ago

demon

demon is for running javascripts in node in the background on linux machines

Usage:

sudo npm install -g demon

From anywhere:

: demon path/to/script.js
Node process running on 11116
: cat ~/.demontmp
11116

.demontmp keeps track of the processes begun by demon. use:

demon kill

to kill all processes begun by demon and to remove ~/.demontmp

Note: demon intentionally runs the risk of a process ending naturally and the pid getting recycled. The user should be the failsafe against blithely running demon kill.

let demon = require('demon')

demon.start('path/to/my/javascript', [some, args, for, child_process.fork], { some : options, for : it }, (err, childProcess) => {
  if(err) console.log('it')
  else console.log(childProcess.pid)
})
demon.kill()  
demon.start('nother/one') <-- also works
demon.start('another', callback) <--also works
0.0.1

2 years ago

0.0.0

2 years ago

1.4.4

9 years ago

1.4.2

9 years ago

1.4.1

10 years ago

1.4.0

10 years ago

1.3.7

10 years ago

1.3.6

10 years ago

1.3.5

10 years ago

1.3.4

10 years ago

1.3.3

10 years ago

1.3.2

10 years ago

1.3.1

10 years ago

1.3.0

10 years ago

1.2.0

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago

0.4.0

10 years ago

0.3.0

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago