Tutorial: Creating and managing a Node.js server on AWS, part 2
Robert Tod
71923

Hi i got error as below when I use window and deploy to my ubuntu aws server

C:\>pm2 deploy ecosystem.config.js production
 → Deploying to production environment
 → on host ec2–XXXXXXXX.ap-XXXXXX-1.compute.amazonaws.com/
Deploy failed
Deploy failed

module.exports = {
 apps: [{
 name: ‘index’,
 script: ‘./index.js’
 }],
 deploy: {
 production: {
 user: ‘ubuntu’,
 host: ‘ec2–XXXXXXX.ap-XXXXXXX-1.compute.amazonaws.com/’,
 key: ‘C:/key.pem’,
 ref: ‘origin/master’,
 repo: ‘git@github.com:XXXXXX/XXX-XXXXX.git’,
 path: ‘/home/ubuntu/source_code/’,
 ‘post-deploy’: ‘npm install && pm2 startOrRestart ecosystem.config.js’
 }
 }
}

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.