How to run a node.js application permanently ? Last Updated : 03 Feb, 2021 Comments Improve Suggest changes Like Article Like Report NodeJS is a runtime environment on a V8 engine for executing JavaScript code with some additional functionality that allows the development of fast and scalable web applications but we can't run the Node.js application locally after closing the terminal or Application, to run the nodeJS application permanently. We use NPM modules such as forever or PM2 to ensure that a given script runs continuously. NPM is a Default Package manager for Node.js Which enables us to access a lot of packages or modules that make things a lot easier for developing a web application. Method 1: Using PM2 module: Installing module in project Directory:npm install pm2 -gStart Your Node.js Application by pm2.pm2 start [Your fileName]All processes listed up which are registered with pm2.pm2 list Console output: We can also stop any process runs by pm2 stop command: pm2 stop all pm2 stop [id number] Method 2: Using forever module Installing module in your project Directory:npm install forever -gStart Your Node.js Application by forever module. forever start [Your FileName]All processes listed up which are registered with foreverforever list Console output: We can also remove or stop any processes that are registered with forever using index (such as 0 in this case) forever stopall forever stop [index] So now your Application will be running permanently even after exiting the terminal or Application. Comment More infoAdvertise with us Next Article How to run a node.js application permanently ? R raviss7415 Follow Improve Article Tags : Web Technologies Node.js NodeJS-Questions Similar Reads How to Deploy Node.js Express Application on Render ? Deploying a Node.js Express application on Render is straightforward and involves a few key steps to set up your project, configure deployment settings, and manage your application on the Render platform. Render provides an easy-to-use platform for deploying applications, offering features like auto 4 min read How to Run Node.js Program as an Executable ? Node.js allows you to create standalone executables from your JavaScript programs, making them easy to distribute and run on various platforms without requiring Node.js to be installed. This article will guide you through the process of converting a Node.js program into an executable file using popu 2 min read How to Create and Run a Node.js Project in VS Code Editor ? Visual Studio Code (VS Code) is a powerful and user-friendly code editor that is widely used for web development. It comes with features like syntax highlighting, code suggestions, and extensions that make coding easier. In this article, we'll show you how to quickly create and run a Node.js project 2 min read How can We Run an External Process with Node.js ? Running external processes from within a Node.js application is a common task that allows you to execute system commands, scripts, or other applications. Node.js provides several built-in modules for this purpose, including child_process, which allows you to spawn, fork, and execute processes. This 4 min read How to Run a Node.js App as a Background Service ? Running a Node.js application as a background service is a common requirement for ensuring that your app stays running even after you log out, or if the system restarts. This can be particularly important for server-side applications, APIs, or any long-running processes. This article explores severa 2 min read Like