nohup node server.js > /dev/null 2>&1 &nohupmeans: Do not terminate this process even when the stty is cut off.> /dev/nullmeans: stdout goes to /dev/null (which is a dummy device that does not record any output).2>&1means: stderr also goes to the stdout (which is already redirected to/dev/null). You may replace &1 with a file path to keep a log of errors, e.g.:2>/tmp/myLog&at the end means: run this command as a background task.
No comments:
Post a Comment