Guides

Build your Next.js App

Build and run your Next.js application in development and production environments.

Build your Next.js App

This guide explains how to build and run your Next.js application in both development and production environments.

Development Mode

For development with hot-reloading capabilities, execute:

Terminal
npm run dev

This enables immediate reflection of code changes in the browser without requiring full page reloads.

Production Mode

Production deployment involves two sequential steps.

Step 1: Create the Build

Generate an optimized production build using:

Terminal
npm run build

This creates an optimized, static version stored in the .next folder.

Step 2: Run the Build

Start the server to serve your optimized application:

Terminal
npm start

Following these steps ensures efficient production deployment. For additional deployment information, consult the Next.js production builds documentation.

AvatarEnda Kelly

© 2026 Enda Kelly, trading as CloudNua. All rights reserved.

Ireland