Ali Shefaee
Ali Shefaee

Reputation: 362

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?

Upvotes: 0

Views: 660

Answers (1)

David
David

Reputation: 864

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

Upvotes: 3

Related Questions