nuxt pm2 로 실행하기 > IT 기술백서

IT 기술백서

직접 알아내거나 검색하기 귀찮아서 모아 둔 것

JavaScript | nuxt pm2 로 실행하기

본문

1. pm2 설치

# npm install pm2 -g

 

2. 실행명세서 작성

# vim echosystem.config.js

[code]

module.exports = {

  apps: [

    {

      name: 'NuxtAppName',

      exec_mode: 'cluster',

      instances: 'max', // Or a number of instances

      script: './node_modules/nuxt/bin/nuxt.js',

      args: 'start'

    }

  ]

}

[/code]

 

3. 실행

# pm2 start

 

4. systemctl 에 등록 (root 권한으로 실행)

# pm2 startup

 

 

댓글 0개

등록된 댓글이 없습니다.

Menu