Back to Developer Roadmap

Environment Variables

src/data/roadmaps/nextjs/content/[email protected]

4.0868 B
Original Source

Environment Variables

Environment variables are dynamic values that can affect the behavior of programs on a computer. They are typically used to store configuration settings, API keys, and other sensitive information that should not be hardcoded directly into the application's source code. This allows you to easily change the application's behavior without modifying the code itself, making it more flexible and secure across different environments like development, testing, and production.

Next.js comes with built-in support for environment variables, which allows you to use .env to load environment variables, and bundle environment variables for the browser by prefixing with NEXT_PUBLIC_

Visit the following resources to learn more: