[pm2] Node.js 앱 데몬화하기👿
pm2란?
- Node.js의 프로세스 매니저
- Node.js 애플리케이션을 무중단으로 운영
pm2 install
1
npm install -g pm2
pm2 start
1
2
pm2 start <filename>
pm2 start <filename> --name=<app name>
파일명+확장자
로 바로 실행하면 파일명으로 생성된다.
원하는 이름으로 실행하고 싶다면 --name=
을 붙인다.
pm2 start + yarn/npm start
이건 아주 힘들게 서치해서 찾았다.
1
pm2 start yarn --name <앱 이름> -- start
What is the PM2
for command yarn run start
?
pm2 list
현재 실행 중인 App 목록 조회
1
pm2 list
pm2 stop
특정 App 중지
1
2
pm2 stop <id>
pm2 stop <name>
Node.js App을 Deamon처럼 활용하기
PM2를 활용한 Node.js 무중단 서비스하기
How to start Reactjs application with PM2 as a service (Linux & MacOS)
This post is licensed under CC BY 4.0 by the author.