page:guides:nuxt:cdn assets

Deliver public assets through CDN for Nuxt

Summary

Cdn assets for a Nuxt app on Ample. Verified on Nuxt: a versioned, immutable-cached asset uploaded to a published bucket and served from the CDN URL. Build and start: nuxt build then node .output/server/index.mjs (reads HOST and PORT) on the node-22 template.

Representative Queries

Prerequisites

Workflow Steps

  1. Build and start
    nuxt build then node .output/server/index.mjs (reads HOST and PORT) on the node-22 template; the server must bind 0.0.0.0 on PORT.
  2. Publish a bucket for public assets
    Publish only the asset bucket; upload versioned keys with an immutable Cache-Control header and build URLs from its public URL.
    Command: ample bucket publish
  3. Verify
    Fetch the live URL and /api/p/versioned-static-assets on the example; on failure read the build and runtime logs.
    Command: ample logs --kind build

Limitations

Cost Estimate

Success Checks

Evidence Summary

Tested Configuration

Template: node-22
Runtime: node
Size: s-1vcpu-1gb
Install: npm install
Build: npm run build --if-present
Start: npm run start

Input Schema

Required: env, name, path