웹 개발/AWS

React Next 프로젝트 배포 후 수정 시

헤일리_HJ 2021. 8. 19. 15:17

front

front 에서 고친게 있을때
gamgwi 안에서 
$ git fetch origin master
$ git pull origin master

front 폴더로 들어가서
$ npx next build

nginx 실행

$ sudo systemctl stop nginx
$ sudo systemctl start nginx
$ sudo systemctl status nginx

npx 실행
$ sudo npx pm2 kill
$ npx pm2 start npm -- start

 


back

back 에서 고친게 있을때


gamgwi 안에서 
$ git fetch origin master
$ git pull origin master

back 폴더로 들어가서
nginx 실행 [https 때문에 설치함]

$ sudo systemctl stop nginx
$ sudo systemctl start nginx
$ sudo systemctl status nginx

pm2 실행
$ sudo npx pm2 kill
$ sudo npx pm2 start server.js