Home  >  Q&A  >  body text

node.js - Please tell me how to use pm2 to enable the webpack-dev-server command

There is a command in package.json that is enabled using webpack-dev-server, such as

"watch": "webpack-dev-server --port 8088 --hide-modules",

To use pm2 to open the service, use pm2 start XXX.js. Please tell me how to use pm2 to open this webpack-dev-server command

ringa_leeringa_lee2676 days ago1761

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-05-24 11:40:34

    PM2 is generally used in the production environment, and webpack-dev-server is used in the development environment. In the development environment, nodemon should be used for process management.

    reply
    0
  • Cancelreply