Full-stack frameworks
Deploy a Nuxt app on Enzonic
Deploy builds Nuxt with the Nitro node-server preset and runs .output/server/index.mjs, so server routes, server-side rendering and runtime config work as in nuxt preview. A build script that runs nuxt generate produces a static site instead.
At a glance
What Enzonic Deploy does with a Nuxt project when you connect it. You can override any of it in the project settings.
- Language
- JavaScript / TypeScript
- Detected from
- nuxt in dependencies or devDependencies; A build script containing "generate" switches to static mode
- Build command
- nuxt build (or your build script)
- Output
- .output (server) or .output/public (static)
- Runs as
- Server or 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
Server
The default. Deploy sets NITRO_PRESET=node-server for the build and starts .output/server/index.mjs.
Static
When the build script runs nuxt generate. Only .output/public is served.
Deploy Nuxt step by step
- 1Connect the repository on deploy.enzonic.com; Nuxt is detected from package.json.
- 2Set NUXT_ prefixed variables for runtime config in the project's environment variables.
- 3Deploy. Previews get their own URL per branch, production follows the default branch.
{
"scripts": {
"build": "nuxt build",
"generate": "nuxt generate",
"dev": "nuxt dev"
}
}Connect a database to Nuxt
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 default defineEventHandler(async () => {
const { rows } = await pool.query('select id, title from posts order by id desc limit 20');
return rows;
});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
- A nitro preset set in nuxt.config to something other than node-server (for example a serverless provider preset) wins over the environment and produces output Deploy cannot run.
- Variables that must reach the browser go under runtimeConfig.public and need the NUXT_PUBLIC_ prefix.
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 |
| Bandwidth | 150 GB/mo | 2 TB/mo |
Related guides
- Deploy a Next.js appApp Router and Pages Router apps as a Node.js server, or a static export.
- Deploy a Vite siteVite single-page apps with React, Vue, Svelte, Solid, Preact or Lit.
- Deploy a SvelteKit appSvelteKit with adapter-node as a server, or adapter-static as a static site.
Ship your Nuxt project tonight
Connect the repository and the build settings fill themselves in. Free plan, no card.