Configuration
48 bites tagged Configuration — interview questions with model answers, and 60-second explainers.
Environment configuration and secrets management in Node.js?
Use environment variables, load from .env file (dev only), never commit secrets. production safety and configuration best practices.
First compilerOptions to set after tsc --init
Enable strict for full type safety, set target and module to match the runtime, and choose outDir/rootDir or moduleResolution; each tightens checks or aligns output. Practical tsconfig priorities.
Managing Per-Environment Configuration in React Native
Use per-environment env files plus build flavors or schemes, inject at build time, keep secrets off the device. environment configuration strategy. hardcoding endpoints or branching on a runtime flag inside one bundle.
Connection pooling and its key parameters
Reuse open connections to skip costly handshakes; tune max pool size and connection timeout. pooling tradeoffs. setting max size huge, exhausting database connections, or treating the pool as free.
How mounted ConfigMap updates propagate to pods
Kubelet refreshes mounted files within roughly a sync period via an atomic symlink swap, but the app must reload on its own; env-var injection never updates. ConfigMap volume update semantics.
Override Helm values at install time
Pass custom files with -f or --values, single keys with --set, and know precedence: defaults, then files, then --set. Helm values overriding. editing the chart templates directly instead of supplying values.
Two ways to consume a ConfigMap in a Pod
Inject keys as environment variables (good for a few simple settings), or mount the ConfigMap as a volume of files (good for config files and live updates). ConfigMap consumption patterns.
ConfigMap vs Secret
ConfigMaps hold non-sensitive plain config; Secrets hold sensitive data, base64-encoded and treated specially (RBAC, optional encryption at rest). Config-versus-sensitive-data separation.
Structuring Compose files across environments
A base compose.yaml plus override files, the default override auto-merge, and explicit -f flags or extends per environment. Compose override and merge mechanics.
GitLab Pipeline Configuration Hierarchy
GitLab pipeline settings stack like access-control layers. Project visibility, pipeline toggles, and role permissions interact to determine who sees logs, artifacts, or can cancel jobs.
How do you disable FastAPI docs but keep the OpenAPI schema?
Tests FastAPI constructor routing: docs_url, redoc_url, and openapi_url. Answer: pass docs_url=None and redoc_url=None while keeping openapi_url="/openapi.json", gated by env var. Red flag: middleware or manual route deletion instead of native configuration.
Manage dev, staging, and prod configs in a large FastAPI app
This tests separating environment config from code with pydantic-settings and env vars. A strong answer covers .env files for local dev, per-environment validation, and secret injection for prod. Red flags are hardcoded values or scattered conditionals.
Parameterization: One Pipeline, Any Environment
Externalize every path, hyperparameter, and compute setting so one pipeline runs unchanged across dev, staging, and production. This enables reproducible experiments and safe CI/CD. The footgun is branch-per-environment repos that silently diverge.
ConfigMap decouples config from container images
A ConfigMap is a key-value store that injects configuration into pods without rebuilding the image. Use it for feature flags, database hostnames, or any non-secret settings. Editing one does not restart existing pods, so stale config is the common footgun.
What is Twelve-Factor's config recommendation for CI/CD and scalability?
Tests Factor III and CI/CD scaling implications. Strong answer: config lives in env vars, never in code, so one build promotes across stages and new instances start with correct context immediately. Red flag: config files checked into version control.
How do you manage environment-specific connection strings and why is hardcoding bad?
Tests config separation and secrets hygiene. Outline: inject via environment variables or a secret store, keep per-environment configs credential-free, and prefer managed identities.
Angular's angular.json: Your Workspace Blueprint
angular.json is the blueprint for your workspace, telling the CLI how to build, serve, and generate code. It defines project paths, build targets, and default prefixes. The footgun: assuming the `projects` section mirrors the file system.
tsconfig.json: The Rulebook for Your TypeScript Project
The tsconfig.json file is the rulebook for the TypeScript compiler, defining which files to process and what rules to enforce. It's essential for setting strictness, module resolution, and output targets.
Next.js Environment Variables: Server vs. Browser
Next.js environment variables separate server secrets from public browser config. Use them for API keys or database strings. The key footgun is exposing secrets by forgetting to prefix browser-accessible variables with `NEXT_PUBLIC_`.
Configuring Security Headers in Next.js
Security headers are rules your server sends the browser to prevent attacks like XSS and clickjacking. In Next.js, you configure these globally in `next.config.js`.
Next.js Route Segment Config
Think of Next.js Route Segment Config as per-route dials for runtime, caching, and timeouts. Use it to run a specific API route on the Edge for speed or increase the timeout for a data-heavy page. The footgun: settings don't cascade to child routes.
next.config.js: Your Next.js App's Control Panel
Think of `next.config.js` as your app's control panel, letting you change Next.js's default behavior. Use it for redirects, environment variables, or image optimization. The biggest footgun: you must restart your dev server after making any changes.
Android Product Flavors for App Environments
Android Product Flavors let you build distinct app variants (like dev, staging, prod) from one codebase, each with its own configuration. Use this for separate builds or white-labeling.
FastAPI: Managing Environment-Specific Settings
Treat app configuration like a contract, not hardcoded values. Pydantic Settings defines required variables (like API keys) and loads them from the environment, preventing you from shipping dev settings to production.
Get Configuration bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
Open testing — you’ll join as an early tester.