티스토리 뷰

Node.js

(Node.js) pm2 인스톨 및 사용

danune.dev 2022. 6. 15. 13:51

서버 실행 유지 및 상태 확인을 위한 pm2 를 인스톨하고 사용하는 방법

 

1. 설치

npm install pm2 -g

 

2. 시작 

# npm start  // 기존 실행
pm2 start npm -- start // pm2로 실행

 

3. 모니터링

$ pm2 monitor
[PM2 I/O] Using non-browser authentication.
[PM2 I/O] Do you have a pm2.io account? (y/n) n
[PM2 I/O] No problem ! We just need few informations to create your account
[PM2 I/O] Please choose an username : {login user name}
[PM2 I/O] Please choose an email : {email}
[PM2 I/O] Please choose a password : {password}

[PM2 I/O] Do you accept the terms and privacy policy (https://pm2.io/legals/terms_conditions.pdf) ?  (y/n) n

[PM2 I/O] Successfully authenticated
[PM2 I/O] Successfully validated
[PM2 I/O] By default we allow you to trial PM2 Plus for 14 days without any credit card.
[PM2 I/O] Successfully created the bucket
[PM2 I/O] Using: Public key: {숨김} | Private key: {숨김} | Machine name: {숨김}

[+] PM2+ activated!

[PM2 I/O] Successfully connected to bucket PM2 Plus Monitoring
[PM2 I/O] You can use the web interface over there: https://app.pm2.io/#/bucket/{숨김}

 

저 마지막줄에 출력된 https://app.pm2.io/.. 로 시작되는 URL로 들어가면 로그인 화면이 나옵니다

그럼 위에서 입력한 username / password로 로그인을 하면 서버 상태를 확인할 수 있습니다

'Node.js' 카테고리의 다른 글

(Node.js) TextEncoder is Not defined 에러  (0) 2022.06.15
(Node.js) mongodb 사용  (0) 2022.06.12
댓글
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday