LEARN. PRACTICE. EXPLAIN.
Learning paths & interview practiceP
Full-stack foundations
LESSON 3 OF 3 · ABOUT 14 MINUTES + EXERCISE

What changes when a local app is deployed?

THE IDEA

What it is

Deployment runs an application in an environment with its own configuration, network routes, storage, and process lifecycle. Browser code is delivered to users; server code and secrets must remain on trusted infrastructure.

Why you need it

A local success can hide missing environment values, a different API origin, or data stored only in process memory. A deployed app must survive restarts and cooperate with older browser tabs.

How it works

  1. Build and identify the artifact being released.
  2. Provide environment configuration and server-only secrets.
  3. Apply compatible schema changes and start the service.
  4. Verify a real user journey, health signals, and a recovery route.
Configuration sketch

Configuration boundaries

Browser-visible:
  API_BASE_URL=https://app.example.test/api

Server-only:
  DATABASE_URL=<injected securely>
  SESSION_SECRET=<injected securely>

Durable store:
  users, sessions, orders

Process memory:
  temporary caches only when safe to lose

The example uses placeholders, not real credentials. A build-time public environment variable can end up in browser assets even if the file that supplied it was not committed.

Good practices and why

  • Verify the exact released artifact and keep secrets out of browser bundles and logs.
  • Test restarts and compatible rollout behavior, including old clients.

Common mistakes

  • Using process-local session state across multiple instances without accepting its limitations.
  • Assuming changing a server variable updates an already-built browser bundle.
GUIDED IMPLEMENTATION

Try it yourself

Create a deployment checklist for a small authenticated task app. Classify each configuration value as public or server-only and name what must survive a restart.

What a successful result looks like

No credential is assigned to browser configuration, and the plan covers persistence, a smoke test, and rollback constraints.

0 / 6000 characters · Saved on this device. Do not include passwords or private data.

Check your understanding

Where can a private database credential safely be placed?

Answer the understanding check correctly to record exercise completion.

PUT THE IDEA UNDER PRESSURE

Related interview practice

These scenarios add constraints and follow-up questions to the concepts you just learned.

Further reading

Selected primary references · reviewed 2026-10-09. Examples are educational; use your framework’s documented integration guidance when building a deployed system.

AlifBay Prep