Skip to content

Static sites and SPAs

Deploy a Angular site on Enzonic

Deploy reads angular.json to find the real output path, including the application builder's browser folder (Angular 17 and later) and the older dist/<project> layout. With @angular/ssr installed, the server bundle runs as a Node.js server.

At a glance

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

Language
TypeScript
Detected from
@angular/core with angular.json or the Angular CLI; angular.json is read for the default project and its outputPath; @angular/ssr switches to server mode
Build command
ng build
Output
dist/<project>/browser (application builder) or dist/<project>
Runs as
Static or Server

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

    The default: the browser output is served as a single-page app.

  • Server

    With @angular/ssr: dist/<project>/server/server.mjs runs as a server.

Deploy Angular step by step

  1. 1Connect the repository; Deploy finds the project in angular.json.
  2. 2For server rendering, run ng add @angular/ssr first.
  3. 3Deploy.

Connect a database to Angular

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/todos.ts
import postgres from 'postgres';

const sql = postgres(process.env.DATABASE_URL!);

export async function GET() {
  return Response.json(await sql`select id, title, done from todos order by id`);
}
A static Angular app calls /api/todos; the function runs on Enzonic next to the site.

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

  • Workspaces with several applications deploy the defaultProject, else the first application by name; set the output directory in the project settings to choose another.

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

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

Start free