Skip to content

Instantly share code, notes, and snippets.

@hassantauqeer
Last active July 6, 2019 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hassantauqeer/5cc0c645bba8516af9265b8229a6b7f6 to your computer and use it in GitHub Desktop.
Save hassantauqeer/5cc0c645bba8516af9265b8229a6b7f6 to your computer and use it in GitHub Desktop.
PM2:
1. Run script on ubuntu to deploy node app
pm2 start npm --name "client" -- run prod
2. pm2 stop and delete process
p2 stop $NAME && p2 delete $NAME
3. Upload a file/dir to server
$ sudo scp -r ~/path/to/dir serverUSerName@serverIP:/path/to/server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment