question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue an error if NODE_ENV=production and you would reach the setup app

See original GitHub issue

Feature 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:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Firehedcommented, Oct 23, 2019

@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.

1reaction
issue-label-bot[bot]commented, Oct 23, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the error when I set "NODE_ENV=production", how ...
This sets NODE_ENV for the current bash session thus any apps started after this statement will have NODE_ENV set to production.
Read more >
Node.js app with NODE_ENV=production doesn't start
Solved: When I set NODE_ENV= development everything goes smoothly and starts, but when I set it to production it shows me this error....
Read more >
"Duplicate declaration" error when running "lingui extract ...
If I set NODE_ENV to development or test , it works fine. (I haven't had time yet to try to replicate this error...
Read more >
What is NODE_ENV in Node.js
The NODE_ENV environment variable specifies the environment in which an application is running (usually, development or production).
Read more >
Express.js Error Handling 101
Every application, no matter how clean the code is, will eventually run into errors. So how do you handle these errors when building...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found