Issue an error if NODE_ENV=production and you would reach the setup app
See original GitHub issueFeature Request
Is your feature request related to a problem? Please describe.
When trying to deploy a Probot app to a production environment, I had an issue with my env vars that prevented it from actually reaching my routes (specifically, I had a typo in PRIVATE_KEY_PATH
). As such, I spent several hours blindly guessing what the problem was since all of the logs indicated that it was starting up fine
Describe the solution you’d like
If NODE_ENV=production
, the startup process should fail loudly and clearly - with errors written to stdout - if it reaches a condition that would run the setup process. Currently, those conditions are a missing APP_ID
and/or a missing or invalid PRIVATE_KEY
or PRIVATE_KEY_PATH
.
Describe alternatives you’ve considered Maybe a command to test that the env/config is production-ready?
Teachability, Documentation, Adoption, Migration Strategy n/a
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
@MaximDevoir’s suggestion may have indeed caught the issue I encountered, but I don’t think it’s an optimal solution to indicate a production misconfiguration. It does look like a check also worth adding.
@gr2m Sure, I can look into putting something together.
Issue-Label Bot is automatically applying the label
enhancement ➕
to this issue, with a confidence of 0.63. Please mark this comment with 👍 or 👎 to give our bot feedback!Links: app homepage, dashboard and code for this bot.