Skip to content

Static sites and SPAs

Deploy a Create React App site on Enzonic

Create React App is deprecated upstream, but plenty of apps still use it. Deploy runs react-scripts build and serves build as a single-page app, so an existing CRA project can move without a rewrite.

At a glance

What Enzonic Deploy does with a Create React App project when you connect it. You can override any of it in the project settings.

Language
JavaScript / TypeScript
Detected from
react-scripts in dependencies
Build command
react-scripts build
Output
build
Runs as
Static

Dependencies install with the package manager your lockfile names: npm ci, pnpm install --frozen-lockfile, yarn install --immutable (Berry) or --frozen-lockfile, or bun install --frozen-lockfile. Node.js 18, 20, 22 and 24 are available. Deploy reads engines.node in package.json, then .nvmrc or .node-version, and uses Node.js 22 when nothing pins a version.

How it runs

  • Static

    Always.

Deploy Create React App step by step

  1. 1Connect the repository and deploy.
  2. 2Add a rewrite to /index.html in enzonic.json for client-side routes.
enzonic.json
{
  "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}

Connect a database to Create React App

Create a database on Enzonic Databases (or from the project's settings) and its connection string is added to the project's environment variables. This example uses PostgreSQL.

api/health.js
import pg from 'pg';

const pool = new pg.Pool({ connectionString: process.env.DATABASE_URL });

export async function GET() {
  await pool.query('select 1');
  return Response.json({ ok: true });
}

Postgres projects get two variables: DATABASE_URL through the connection pooler for the app, and DATABASE_URL_UNPOOLED for migrations.

PostgreSQL on Enzonic DatabasesEvery database engine

Things to know

  • Only REACT_APP_ variables are embedded in the bundle, at build time.
  • Moving to Vite later needs no change on Enzonic: Deploy detects the new setup on the next push.

Plan limits that matter here

From the live plan data. Every plan includes previews for each branch, instant rollback, environment variables and logs.

Plan limits that matter for Create React App
LimitFreePro
Build minutes3,000/mo, 1 concurrent10,000/mo, 3 concurrent
Function memory / timeout1 GB / 300 s4 GB / 1800 s
Function invocations2 M/mo20 M/mo
Bandwidth150 GB/mo2 TB/mo

Compare every plan

Related guides

Ship your Create React App project tonight

Connect the repository and the build settings fill themselves in. Free plan, no card.

Start free