C_CPE_2409 · Question #40
What is the purpose of the .env file in a CAP project?
The correct answer is C. To store values for runtime environment variables. In a CAP (Cloud Application Programming) project, the .env file holds key-value pairs that are injected as environment variables at runtime - things like database credentials, service URLs, and API keys that vary between development, staging, and production environments, making…
Question
What is the purpose of the .env file in a CAP project?
Options
- ATo manage version control settings
- BTo specify Ul component settings
- CTo store values for runtime environment variables
How the community answered
(49 responses)- A4% (2)
- B8% (4)
- C88% (43)
Explanation
In a CAP (Cloud Application Programming) project, the .env file holds key-value pairs that are injected as environment variables at runtime - things like database credentials, service URLs, and API keys that vary between development, staging, and production environments, making C correct. Option A is wrong because version control is managed by tools like Git and its .gitignore file, not .env. Option B is wrong because UI component configuration lives in framework-specific files (like manifest.json for SAPUI5), not in environment variable files. Memory tip: Think of .env as your app's "environment-specific secrets locker" - it holds runtime values you wouldn't hard-code into source files, which is why .env files are typically added to .gitignore to keep sensitive data out of version control.
Topics
Community Discussion
No community discussion yet for this question.