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
- 1Connect the repository; Deploy finds the project in angular.json.
- 2For server rendering, run ng add @angular/ssr first.
- 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.
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`);
}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
- 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.
| Limit | Free | Pro |
|---|---|---|
| Build minutes | 3,000/mo, 1 concurrent | 10,000/mo, 3 concurrent |
| Servers | 1 instance, 512 MB, sleeps after 15 min idle | 3 always-on, 2 GB |
| 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 Create React App siteExisting Create React App projects, served from build.
- Deploy a NestJS appNestJS APIs compiled with nest build and started from dist/main.js.
Ship your Angular project tonight
Connect the repository and the build settings fill themselves in. Free plan, no card.