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
- 1Connect the repository and deploy.
- 2Add a rewrite to /index.html in enzonic.json for client-side routes.
{
"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.
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 engineThings 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.
| Limit | Free | Pro |
|---|---|---|
| Build minutes | 3,000/mo, 1 concurrent | 10,000/mo, 3 concurrent |
| Function memory / timeout | 1 GB / 300 s | 4 GB / 1800 s |
| Function invocations | 2 M/mo | 20 M/mo |
| Bandwidth | 150 GB/mo | 2 TB/mo |
Related guides
- Deploy a Vite siteVite single-page apps with React, Vue, Svelte, Solid, Preact or Lit.
- Deploy a Angular siteAngular apps as a static SPA, or server-rendered with @angular/ssr.
- Deploy a Static HTML sitePlain HTML, CSS and JavaScript, no build step.
Ship your Create React App project tonight
Connect the repository and the build settings fill themselves in. Free plan, no card.