0

When I do:

node server.js

Then my terminal (osx) starts to listen for messages like errors and logs from the node app.

  1. How can I start node without listening?
  2. How can I stop listening programtically from within node.js?
1
  • What's in server.js? Commented Mar 24, 2013 at 2:33

1 Answer 1

2

If you are using bash shell (the typical default on a Unix-like operating system such as OS X), you can start it up like this:

node server.js 2>&1 >/dev/null

That directs STDERR and STDOUT to /dev/null.

If you also want to throw the process into the background so you can do other things in the shell, add a & at the end:

node server.js 2>&1 >/dev/null &

Just make sure you know how to bring it back to the foreground (fg command) and/or know how to kill it when you no longer want it running.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.