Skip to content

Deploy Your First Web App With a Recovery Plan

Prepare a small event app for deployment by separating configuration, protecting credentials and rehearsing a rollback in a test environment.

Muhammad Azhar November 7, 2026 Editorial date: November 7, 2026 4 min read

A successful upload proves that files reached a server. It does not prove that visitors can use the application or that you can recover from a bad release. For a first deployment, choose a small fictional event app: a public schedule and an authenticated organizer screen. The useful milestone is a release you can identify, check and replace.

The steps below are a provider-independent working method. Hosting commands, runtime support and rollback features vary. Read your chosen host's deployment documentation before running commands, and rehearse in a test environment with fictional records.

Know what is being deployed

Write down the source revision, runtime requirements and build command. Identify the folder or artifact that the host actually serves. A project can contain source files, generated output and local dependencies; copying the wrong folder is a common reason a page works locally and fails after upload.

Build from a known dependency lockfile when your toolchain provides one. Keep a copy of the deployable artifact or a reproducible way to rebuild the exact release. Label the event app's test release A and its next release B. Those labels will make the recovery exercise concrete without depending on a particular hosting dashboard.

Document two useful routes: the public schedule and the organizer sign-in page. Add a harmless readiness endpoint if your backend needs one, but keep its response free of credentials and internal configuration. A 200 response from a static landing page cannot prove that the application's database connection works.

Separate public settings from credentials

List settings that change between local development and hosting: the app's base URL, database address and external service credentials. The Twelve-Factor configuration guidance explains separating deployment configuration from application code. Host-managed environment variables or secret stores are common ways to supply server configuration.

An environment variable is not automatically a secret boundary. Some frontend build tools copy selected values into JavaScript delivered to visitors. Treat anything in a browser bundle, HTML response or public request as visible. Put privileged API calls on a backend that enforces authorization; never place a paid service's secret key in browser code.

Commit a configuration example containing names and harmless placeholders, then configure actual values in the hosting environment. Do not log the resolved values just to prove they were loaded. If you use GitHub Actions, its secrets documentation explains repository and environment secrets. Access and behavior depend on your repository and workflow configuration.

Rehearse the release check

Deploy release A to the test environment. Use the public URL over HTTPS and check the actual behavior: open the schedule, follow an internal link, load the sign-in screen and request a missing page. Confirm that a signed-out visitor cannot access organizer data. Check the browser console and server logs for relevant errors without copying personal data into a report.

For release B, change a harmless schedule heading and deploy the same way. Refresh the public page and check that the expected release is visible. If the old heading remains, inspect cache behavior and the served artifact before repeatedly deploying. An upload log and a browser view are evidence about different parts of the release.

Deployment systems may support environment rules and branch restrictions. GitHub's deployment environment reference describes these controls and their availability limits. Use the controls your setup supports; do not assume that a named environment alone prevents an accidental production release.

Exercise a recovery without losing data

  1. Keep release A available and record how it was deployed.
  2. Deploy release B to the test environment and confirm the changed heading.
  3. Redeploy A using the host's supported mechanism.
  4. Confirm the original heading and repeat the same route checks.
  5. Record which step failed or required an undocumented manual action.

The expected result is a repeatable return to release A with evidence that its useful routes still work. A rollback of code does not undo a destructive database migration. For an app with stored records, make schema changes compatible with the previous release where practical, back up data and test restoration separately.

Before adding an external integration, explore failure responses in the simulated HTTP workbench. Decide how the deployed event app should react to throttling or a server error. The simulator cannot verify your host, TLS, credentials or backups; those require checks in your own environment. Finish the rehearsal by saving the exact recovery steps beside the project so the next release does not depend on memory.

Sources and further reading