How to create the .env file?

I noticed that in my project there was created an .env file.

I removed it. Now I am trying to automatically create the .env file again, but can’t find how.

Please, explain how to make DFX create the .env file with canister principals.

Add this to your dfx.json: "output_env_file": ".env"

1 Like

I’ve found: dfx deploy frontend creates .env file.

2 Likes