Added conditional to only require dotenv outside of production.