in reply to Best practices for distinguishing "development" from "production?"
The code, when running, can readily distinguish between them (e.g. for development vs. production) environments, say to run different libraries between each.
I use environment variables for that. You don't want the code to do autodetection based on the environment, because you benefit from having development/staging/production servers to be very similar.
A single body of code can be deployed, without change, and it will run appropriately in each case.
There are pre-made solutions for that, see Plack.
The code that does it is simple, reliable, self-evident
When dealing with different webserver environments? Surely you must be joking.
The best you can do is reuse well-test solutions. They can be reliable, and maybe their usage is simple, and evident from the documentation.
|
|---|