Tutorials
How to deploy NextJs application on Vercel

How to deploy NextJs application on Vercel

centered cover image

In this tutorial, we will learn how to deploy a Next.js application on Vercel. We will also go over the steps to create a Next.js application and deploy it on Vercel.

Prerequisites

To follow along with this tutorial, you should have a basic understanding of the following:

  • HTML
  • CSS
  • JavaScript
  • Node.js
  • Next.js

What is Vercel?

Vercel is a cloud platform for hosting websites and web applications. It is built on top of the popular serverless framework, Now. Vercel allows you to deploy your applications with just a few clicks, and provides a host of features such as custom domains, automatic HTTPS, and more.

Creating a Next.js App

Before we can deploy our application, we need to create a Next.js app. To do this, we will use the create-next-app command. This command will set up a basic application with all the necessary files and dependencies.

npx create-next-app my-app

This will create a new directory called my-app which contains our application.

Deploying the App on Vercel

Once our application is created, we can deploy it on Vercel. Vercel makes deploying applications easy with its GitHub integration. To deploy our application, we need to first log into Vercel with our GitHub account.

Once logged in, we can click the "New Project" button to start the deployment process. This will bring us to the Vercel dashboard. Here, we can select our repository and choose the branch we want to deploy.

Once we have selected our repository and branch, we can click the "Deploy" button. Vercel will then build our application and deploy it to a live URL.

Conclusion

In this tutorial, we learned how to deploy a Next.js application on Vercel. We also went over the steps to create a Next.js application and deploy it on Vercel.

Vercel makes deploying applications easy with its GitHub integration. We can simply log into Vercel with our GitHub account, select our repository and branch, and click the "Deploy" button. Vercel will then build our application and deploy it to a live URL.

For more information, please refer to the official documentation (opens in a new tab).