Maybe add a "on init" method for checking environment and other stuff
See original GitHub issueFeature Request
Is your feature request related to a problem? Please describe. For GitHub Enterprise usage, sometimes we want to check the environment before starting up the server. It’s good to know the problems right away.
Describe the solution you’d like Add an “on init” method that will run every time (or configurable) that users can define in the Application to do some health checking.
Describe alternatives you’ve considered
Adding a script that npm run dev
runs would also work, but doesn’t feel as clean.
Teachability, Documentation, Adoption, Migration Strategy Can probably simply document this the same way as any other Application API.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Google cloud function Golang unit test with init() - Stack Overflow
Specifically, the environment variables that I want to inject during the test phase are not recognized, since the init() function always ...
Read more >Environment Dependencies — Ray 2.2.0
There are two options for when to install the runtime environment: As soon as the job starts (i.e., as soon as ray.init() is...
Read more >Unit Tests, How to Write Testable Code, and Why It Matters
Essentially, a unit test is a method that instantiates a small portion of our application and verifies its behavior independently from other parts....
Read more >Environments - AWS Cloud Development Kit (AWS CDK) v2
Access environment variables via Node's process object. Use the os module's environ dictionary to access environment variables. Use System.
Read more >How To Set Environment Variables - Twilio
Environment variables in your system describe your environment. Learn how to set up environment variables in Linux, Windows, macOS, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Why not do that in your app’s code?
I think you are right about why that wasn’t executed. Yes doing it in the top level app initiation works. Thanks!