Cloud Lab 05

Run an Express API on a server.

Compare a persistent Node.js process with static Pages and choose ECS or Simple Application Server deliberately.

Last verified: 26 August 2026

Persistent server versus Pages

ESA PagesECS / Simple Application Server
Publishes static build outputRuns a persistent operating system and processes
No Express listener requiredExpress can listen continuously behind a reverse proxy
Platform handles static deliveryYou manage patches, firewall, process uptime and backups

ECS or Simple Application Server?

Simple Application Server packages compute, storage and networking for a simpler standalone deployment. ECS provides more granular infrastructure and networking control. Select based on workload and operational needs—not only the initial price.

Purchasing a server generates charges. Review region, image, CPU, memory, disk, public bandwidth, data-transfer allowance, subscription duration and auto-renewal before confirming. Stop or release test resources according to the product’s billing rules.
Official Alibaba Cloud: Create a Simple Application Server →

Safe deployment outline

  1. Create a Linux server near the intended users and configure key-based SSH access.
  2. Patch the operating system and install a supported Node.js release.
  3. Deploy source, run npm ci --omit=dev and configure secrets through protected environment variables.
  4. Run Express under a process supervisor and bind it to localhost rather than exposing its development port directly.
  5. Place a maintained reverse proxy in front, allow only required firewall ports and configure HTTPS.
  6. Enable logs, monitoring, backups and security updates; test restore and restart behaviour.

Connecting RDS comes later

Before adding a managed database, learn private networking, security groups, least-privilege database users, encrypted connections, schema migrations, backups, connection pooling and secret rotation. RDS and its network traffic can generate separate charges.

Keep the static frontend on ESA Pages and expose only the required API routes from the server. Never put database credentials in Vite environment variables shipped to the browser.