Logo

Deployment

Step-by-step guide to deploy your ShipAhead project on Vercel or Cloudflare for fast, reliable, and scalable hosting.


Pre-Commit and Deployment Checklist

Before committing or deploying, complete these steps:

  • Run `npm run lint-fix` to check and fix code errors.
  • Run `npm run format` to ensure consistent code style.
  • Test locally with `npm run dev` to verify functionality.
  • Check `.env.local` file for correct environment variables (e.g., API keys).
  • Don’t commit sensitive files (e.g., .env / .env.local)
  • Commit changes with a clear commit message.
  • Push changes to your GitHub repository.
  • Verify environment variables are set in your deployment platform.

Vercel

Deploy your project to Vercel with these steps:

  1. Push your project to a private GitHub repository.
  2. Sign up / Log in to Vercel and click New Project.
  3. Import your GitHub repository.
  4. Set Framework Preset to Nuxt.js.
  5. Add environment variables (from .env) if needed.
  6. Click Deploy to build and launch your app.
  7. Access your live site at the provided Vercel URL.

Cloudflare Workers

Deploy your project to Cloudflare Workers with these steps:

  1. Sign up / Log in to Cloudflare.

  2. Set up Hyperdrive (for database connections):

    • In the Cloudflare dashboard, go to Workers & Pages → Hyperdrive.
    • Click Create Hyperdrive and connect it to your database (e.g., Postgres, MySQL).
    • Once created, copy the Hyperdrive ID.
    • Run the following command in your project
      terminal
      mv wrangler.example.toml wrangler.toml
    • Set it to wrangler.toml:
      wrangler.toml
      [[hyperdrive]]
      binding = "HYPERDRIVE"
      id = "your-hyperdrive-id"
  3. Set nitro preset in environment variable:

    .env.local
    NITRO_PRESET="cloudflare_module"
  4. Commit changes and push to your repository.

  5. Deploy via Cloudflare:

    • Go to Workers & Pages → Create Application → Create Worker.
    • Connect your GitHub repository.
    • Set the build command to: npm run build
    • Add environment variables (.env.local values).
    • Click Deploy to build and launch
  6. Access your live site at the Cloudflare Workers URL.

Usage

  • Vercel/Cloudflare: Both platforms auto-deploy on every push to the main branch.
  • Verify Deployment: Visit your live URL to confirm the app works.
  • Check Logs: Monitor logs in the Vercel or Cloudflare dashboards if errors occur.
  • For more details, see the Nuxt Deployment Documentation.