Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»General Articles»Running “npm start” with PM2

    Running “npm start” with PM2

    By RahulJuly 13, 20221 Min Read

    PM2 is an advanced process manager for running Node.js applications. That provides an easier option to automate a Node.js application. We can quickly do the start, stop, or other operations on applications. Many of the Node.js applications use “npm start” to run. In this quick how-to guide, we will help you to run “npm start” using pm2.

    Advertisement

    Assuming that you already have Node.js installed on your system. If you haven’t already, visit our tutorial to install Node.js using nvm.

    1. Installing PM2: Make sure you have installed PM2 globally on your machine with this command:
      npm install pm2 --location=global 
      

      After installing pm2, run “pm2 startup” once to configure auto-start pm2 during system reboot.

    2. Start npm: PM2 also supports to run npm start:
      pm2 start npm -- start 
      

      Use the --name option to assign a name to the PM2 process.

      pm2 start npm --name "my_app" -- start 
      
    3. List all service running with pm2
      pm2 list 
      

    Hopefully, this article helped you to run the NPM application using the pm2 process manager.

    See the screenshots of running npm start with pm2.

    How to run npm start using pm2
    Running npm start with pm2

    NodeJs npm pm2
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    What is Media Access Control (MAC) Address?

    SQL Queries to Change Domain Name for WordPress Site

    How To Block Specific Keywords Using Squid Proxy Server

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Setting and Getting the Default Timezone in Python
    • What is Media Access Control (MAC) Address?
    • What is Cross-Site Scripting (XSS)?
    • What is Content Security Policy (CSP)?
    • A User’s Guide to Understanding Redirection Operators in Bash
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.