简体   繁体   中英

restart node app after app crash using nodemon

I am hosting a node js app on vps and I want to restart app if app crashed. is it good to use nodemon instead of node for start in package.json file? (performance and memory usage on production)

  "scripts": {
    "start": "node db",
    "dev": "nodemon db"
  }

alternatively, is pm2 suggested here is good for both server crash and app crash?

I would suggest using pm2 in production. It definitely handles crashes better than nodemon

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM