Skip to content

Full-stack frameworks

Deploy a Remix app on Enzonic

Deploy builds Remix with remix vite:build when the project uses Vite and remix build otherwise, then serves build/server/index.js with remix-serve. A build that only produces build/client is deployed as a single-page app.

At a glance

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

Language
JavaScript / TypeScript
Detected from
@remix-run/* packages in dependencies; vite in dependencies chooses remix vite:build
Build command
remix vite:build or remix build
Output
build
Runs as
Server or SPA

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

  • Server

    When build/server/index.js exists: started with remix-serve.

  • SPA

    When only build/client exists: every route falls back to index.html.

Deploy Remix step by step

  1. 1Keep @remix-run/serve in dependencies (it starts the server).
  2. 2Connect the repository; Remix and the Vite plugin are detected from package.json.
  3. 3Deploy and open the preview URL of your branch.

Connect a database to Remix

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.

app/routes/_index.tsx
import { json } from '@remix-run/node';
import { useLoaderData } from '@remix-run/react';
import pg from 'pg';

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

export async function loader() {
  const { rows } = await pool.query('select id, title from posts limit 20');
  return json({ posts: rows });
}

export default function Index() {
  const { posts } = useLoaderData<typeof loader>();
  return <ul>{posts.map((p) => <li key={p.id}>{p.title}</li>)}</ul>;
}

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

  • Deploy expects the standard build/server/index.js and build/client layout. A custom serverBuildPath stops the build with a message naming the expected files.
  • New projects started from Remix today are React Router 7 apps; see the React Router guide for those.

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 Remix
LimitFreePro
Build minutes3,000/mo, 1 concurrent10,000/mo, 3 concurrent
Servers1 instance, 512 MB, sleeps after 15 min idle3 always-on, 2 GB
Bandwidth150 GB/mo2 TB/mo

Compare every plan

Related guides

Ship your Remix project tonight

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

Start free