How do I take advantage of the new .env files? I want to setup a local and production environment in Craft 3.
Anyone know how to do this or know of any docs out there explaining it ?
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It only takes a minute to sign up.Sign up to join this community
These are the two approaches I usually choose from:
devenvironment, is in the array that has the 'dev' key (If you use the default general config file)
One of the reasons this approach exists, is that the makers of PHP dotenv (used in option 1) 'warn against using it in production' (as quoted from the README of option 2). The method as linked in the title uses a PHP file and some minor alterations to your config and index files to let you maintain a multi environment build.