nodemon: nodemon cannot run in background with nohup?
I use nohup nodemon server.js &. It seems nodemon is killed soon.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 34 (4 by maintainers)
Commits related to this issue
- ensured nodemon can run in the background cf. https://github.com/remy/nodemon/issues/296 — committed to complate/complate-sample-express by FND 7 years ago
- use -I to let nohup work see https://github.com/remy/nodemon/issues/296 — committed to olore/bart-chalkboard by olore 4 years ago
this may be help:
nohup nodemon app.js </dev/null &details: https://github.com/remy/nodemon/issues/98
Another possible solution:
nohup nodemon -I app.jsThe -I switch prevents nodemon from attempting to use STDIN, which isn’t allowed under nohup as there’s no input stream.
@leoliaolei you can use nodemon with
tmuxnohup nodemon app.js </dev/null & works for me! thanks!
I had same issue. Here is my work around Created a shell script exec.sh
Then execute the script with nohup
i can put it to background, but after close ssh connection, nodemon stopped, because after connecet to ssh again i dont have any package on background
Last login: Mon Jul 25 10:01:35 2016 from 46.224.238.119 hello@ubuntu:~$ fg -bash: fg: current: no such jobI has try nohup nodemon </dev/null & But not work, I got log
8 Jul 15:00:57 - [33m[nodemon] v1.2.0[39m 8 Jul 15:00:57 - [33m[nodemon] to restart at any time, enter
rs[39m 8 Jul 15:00:57 - [33m[nodemon] watching: _._[39m 8 Jul 15:00:57 - [32m[nodemon] startingnode ./bin/www[39m events.js:85 throw er; // Unhandled ‘error’ event ^ Error: listen EADDRINUSE at exports._errnoException (util.js:742:11) at Server._listen2 (net.js:1126:14) at listen (net.js:1148:10) at Server.listen (net.js:1223:5) at Server.listen (/var/www/appota_inside/node_modules/livereload/lib/livereload.js:69:28) at Object.exports.createServer (/var/www/appota_inside/node_modules/livereload/lib/livereload.js:201:12) at Object.<anonymous> (/var/www/appota_inside/app.js:28:21) at Module._compile (module.js:449:26) at Object.Module._extensions…js (module.js:467:10) at Module.load (module.js:349:32) 8 Jul 15:00:58 - [31m[nodemon] app crashed - waiting for file changes before starting…[39m