Auto-detect environment based on specific server environment variables, and allow per environment configuration and environment emulation.