'"AWS" I put pm2 start to run node.js API with user data in the startup template of intance, but the server does not run
To run the node.js API Server on the instance automatically created by auto scaling, enter the pm2 start command in the user data of the start template and use the created start template to create and run ec2 for testing. The server could not be found.
This is the command entered in the user data of the startup template: no.1 #!/bin/bash cd /home/ec2-user/hynix_api npx pm2 start index.js -- start
no.2 #!/bin/bash pm2 start /home/ec2-user/hynix_api/index.js
I tried two things like that, but the server is not running.
linux name : amazon linux 2
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
