0

I have a node.js application. I want to run it in the background without keeping the terminal always open.

How can I achieve this?

1
  • This is loosely called "daemonizing" as in "turning it into a daemon process" and there are many tools that do this easily found on NPM if you know the keywords to search for. Commented May 23, 2021 at 6:50

2 Answers 2

1

You can use either PM2 process manager (https://www.npmjs.com/package/pm2)

Or You can use forever (https://www.npmjs.com/package/forever)

Or simply you can use nohup as

nohup node index.js &

This will run the node process in detached form in the background

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

Comments

0

you need pm2.js;

goto PM2 Quick Start

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.