Last 12 weeks · 0 commits
2 of 6 standards met
I recently ran into the case where one of my apps had stopped and when i tried to restart it said it was started and showed the name and port, etc. However it was not actually running when re-running . This led me to dig through the code a bit and I found that in , was indeed called and successfully returned the proper response that i was seeing. This means that most likely the method does not handle the case that I was seeing. I then decided to investigate the app within the pm2 scope. So I ran which showed that my app was indeed stopped and when running and checking again it was still stopped. The only way I could find around this was to run and then re-run . After this It seemed to work just fine. Im not entirely sure of this but In order to fix this perhaps you could get the status of the app from pm2 before running start, and if it is stopped then delete it from pm2, and proceed.
This commit adds support for the "script" key/value in a pod app's config. See here for PM2 documentation. This behavior is beneficial if there is no default entry point defined in the package.json. Possible use cases: Unable to modify the repository (unlikely, but possible.) Repository with two different codebases included (also unlikely but certainly possible.) @yyx990803 Before merging, should the key/value take precedence over package.json's key/value?
Repository: yyx990803/pod. Description: Git push deploy for Node.js Stars: 1335, Forks: 109. Primary language: JavaScript. Languages: JavaScript (88.6%), Shell (7.6%), HTML (1.9%), CSS (1.9%). License: MIT. Open PRs: 3, open issues: 30. Last activity: 5y ago. Community health: 42%. Top contributors: yyx990803, meldsza, taylorzane, michaelowens, mjhasbach, coderofsalvation, psirenny, bnns, JonathanMH, leeroybrun and others.