.env.local Here
In the root directory of your project, create a new file named exactly .env.local .
Do not use spaces around the = sign. KEY = VALUE will often break the parser. Use KEY=VALUE . Summary .env.local
Do not put spaces around the = .
Before .env.local , developers often accidentally pushed sensitive API keys or database passwords to public repositories like GitHub. To fix this, frameworks introduced a hierarchy of environment files: In the root directory of your project, create
In this example, when you run your application locally, it will use http://localhost:8000 as the API URL, overriding the default value provided in .env . This way, you can work against a local API without altering the committed configuration. Use KEY=VALUE
The security model of .env.local is based on .
# Environment files .env.local .env.*.local