Our goals:

In the previous group, there was a lack of infrastructure resource. For example, in this project, every time the Backend server sourcecode was pushed by git client, someone had to manually send git to AWS Pull and pM2 startup, too troublesome. I want to use Git push to automatically complete the following process. Dig a hole first.

Let’s take it step by step. See if you can write two scripts first:

Pm2_stop: Stops four server processes pm2_start: starts four server processes?

For more of Jerry’s original articles, please follow the public account “Wang Zixi “: