Grokking ExpressJS
Vote

0% completed

​

Using PM2 for Process Management and Auto-Restart

A process manager is a program that starts your application, keeps track of it while it runs, and starts it again when it stops unexpectedly. When you run node server.js in a terminal, nothing does this for you: if the process crashes at night, the API stays down until someone notices. PM2 is a process manager for Node.js, and it also runs several copies of one app to use more than one CPU core.

This chapter is about keeping the task API fast and available under real traffic. This lesson runs it under PM2, and the next two spread requests over several servers and add a Redis cache.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content