page:guides:nuxt:build and start

Configure build and start for Nuxt

Summary

Configure build and start for a Nuxt app on Ample. nuxt build produces .output; start it with node .output/server/index.mjs, which reads PORT and binds all interfaces. Ample detects the runtime, installs dependencies, runs the build when present, and starts the app on the node-22 template behind a public HTTPS URL.

Overview

Prerequisites

Tested Configuration

Workflow Steps

  1. Make the start command bind correctly:

    • nuxt build produces .output; start it with node .output/server/index.mjs, which reads PORT and binds all interfaces.
  2. Deploy:

    • Run the existing synchronous deploy once from the project directory and read the result. Exit 0 is live, 1 is failed, 2 is blocked on a required preflight action.
    • Command: ample deploy . --name --public --format json
  3. Verify:

    • Fetch the live URL and run the success checks below. On failure, read the build log, then the runtime log, fix the cause, and deploy again; do not blind-retry.
    • Command: ample logs --kind build

Success Checks

Limitations

Cost Estimate

Examples

Evidence Summary

Next Actions