I am using the pm2 npm package and DB-migrate npm package. What I want - Either when I migrate my DB so -
db-migrate up , so pm2 restart 0 command also execute.
command auto execute to restart my server.
Or I just run the pm2 start command. So
db-migrate up command execute within this.
I don't want to run 2 commands in each migration.
Currently every time I need to do -
db-migrate up
pm2 restart 0
I want single command to migrate db and restart my Linux server