$ man environment-files
Engineering · Data Formats
Environment Files
Files that store environment variables for local development.
by Shawn Tenam
なぜ重要か
.env files keep secrets out of Git. API keys, tokens, database URLs. They're local only. Each developer has their own. Vercel has its own set for production.
どう使うか
Create .env in your project root. Add API_KEY=value. Add .env to .gitignore. Load variables with process.env.API_KEY in code.
関連用語