Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Deploying a Next.js App | Section
Building Web Apps with Next.js

bookDeploying a Next.js App

Deslize para mostrar o menu

Once your app is ready for production, the final step is deployment. This means publishing your project so other people can access it on the web.

Next.js supports different deployment approaches, but the most common and beginner-friendly option is deploying to Vercel, the platform created by the team behind Next.js. Vercel has first-class support for Next.js projects and can connect directly to a Git provider to create deployments automatically.

Typical Deployment Flow

A common workflow looks like this:

  1. Push your project to a Git repository;
  2. Import the repository into Vercel;
  3. Let Vercel build and deploy the app;
  4. Receive a live URL for your project.

Vercel can also generate preview deployments for pull requests, which makes it easier to test changes before publishing them to production.

Why Vercel Is a Good Fit

For a Next.js project, Vercel removes much of the setup work. It understands the framework, handles builds automatically, and works well with App Router features. This makes it a practical default choice for learners who want to publish an app without dealing with server configuration too early.

Other Deployment Options

Next.js can also be deployed outside Vercel. The official docs describe support for running it as a Node.js server, in Docker, or through other platform integrations. Modern Next.js also includes an adapters API to help deployment platforms integrate with the Next.js build process.

What Happens After Deployment

After deployment, your app becomes available through a public URL. At that point, you can test navigation, metadata, forms, and route handlers in a real environment.

This is an important moment because it turns your project from a local exercise into a real web application that other people can open and use.

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 33

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

Seção 1. Capítulo 33
some-alt