Deploy a Next.js app to revenexx Storefronts

Learn how to setup and deploy Next.js apps on revenexx Storefronts.

Create Next.js app

Next.js runs on a Node runtime at the origin, on either adapter — no extra adapter package to install. Note that Next.js changes its output directory between the two: ./.next for ssr, ./out for static. See Rendering.

First, create a Next.js app.

Open your terminal, and run the following command.

Bash
npx create-next-app@latest

Push this project to a GitHub repository.

Sign in to Cockpit

Open Cockpit and select the tenant you're deploying for. If this is your first time using revenexx, create your account first.

Create site

In Cockpit, go to Experience Studio → Sites, create a new site, and choose the Git path.

Connect your GitHub account and select the repository you intend to deploy (or allow all repositories, for future ease).

  1. Select the production branch and root directory from your repo.
  2. Verify that the correct framework is selected. If it isn't, pick Next.js from the list.
  3. Confirm the install command, build command, and output directory in the build settings. The default build settings for Next.js are:
    • Install command: npm install
    • Build command: npm run build
    • Output directory: ./.next
  4. Add any environment variables the app needs at build or run time.

Click on the Deploy button.

Visit site

After successful deployment, click on the Visit site button.

Was this page helpful?