.env.sample -
DATABASE_URL=postgresql://user:pass@localhost:5432/mydb API_KEY=sk_live_abc123def456 NODE_ENV=production PORT=3000
A new team member clones the repo, sees .env.sample , copies it to .env , and fills in real values. Without this, they must guess or ask teammates for every variable. .env.sample
In reality, the .env.sample file is one of the most important pieces of documentation for any modern software project. It is the bridge between "it works on my machine" and "it works on yours." What is a .env.sample File? copies it to .env