Building and Deploying a Next.js App on Vercel
Tags: javascript, vercel, devrel, building
Published: 2022-06-22 08:31:07

Today, we will be discussing how to build and deploy a Next.js Blog on Vercel. Compared to No-Code Tools, building with Next.js and Vercel gives you total freedom to code from scratch or modify FREE templates to your taste.

To do that we will need 2 major things, a Github account and a Vercel account. If you do not have these two things ready, kindly create accounts before we proceed. If you have it already you can go on with the rest of the tutorial.

## Why Next.js Blog and Why Vercel?

According to Microsoft, Next.js is a framework for creating server-rendered JavaScript apps based on React.js, Node.js, Webpack and Babel.js. It is basically a project boilerplate for React, crafted with attention to best practices, that allows you to create "universal" web apps in a simple, consistent way, with hardly any configuration.

Vercel is the best place to deploy any frontend app. Deployment is done with little to no special configuration giving developers more time to spend on building apps.

**

## To start with:
**

1. Visit [Vercel](vercel.com/login)
2. Login with the Github Option
3. Enter your Github Login Credentials and
4. Verify your log in by entering the verification code sent to your phone/email inbox.
5. You will now be redirected to the Vercel Dashboard, as shown below:
![Vercel Dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vfknd2ygxdfght0l22ix.png)
6. Click on the "New Project" on the top-right hand side of the dashboard,
![Vercel Dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vfknd2ygxdfght0l22ix.png)
7. You will be redirected to this page, where you have the option of using a template or importing a project from your Github repo.
![New Project Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tkjxcjs028meo7delkje.png)
8. For the sake of this tutorial, we are going to use a template - A Next.js app and a Serverless Function API.
Create a repository by clicking on the Github button.
![Create new repository](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sxjuqrrkr92julz3sfax.png)
9. Enter your preferred name for the project and deploy.
![Name Project](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gxl65mt77nk8nb3yhkbb.png)
![Deploy App](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q1xgskq4bckg1tnnbmha.png)
![Deploying App](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cm199juzyaj8azogsyks.png)
10. Congratulations, you just deployed a Next.js app.
![Next.js App Deployment Complete](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1wvdrq9p5cn9di478dac.png)
11. To access your app, click on the auto-generated domain created Vercel - https://nextjs-rho-eight-22.vercel.app/, you will be redirected to a new tab showcasing your newly deployed Next.js.
![Next.js App Deployment Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q6eb7e2suw65au9slkko.png)
![Next.js App Homepage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/10nffkxi4qlph30qqdv7.png)
12. To make changes to the source code of the Next.js app, you can access the source code through the repo created on your Github profile.

The fantastic team at Vercel has made the deployment process as straightforward as possible. It takes less than 5 minutes to deploy a Next.js app on Vercel.

In summary, we have learnt how to build and deploy a Next.js app on Vercel. To do that we need a Github account and a Vercel account linked to our Github account.
We then created a new project from the Vercel Dashboard, choose a Next.js template, cloned it to our Github repo and deployed the app live on an auto-generated domain by vercel at https://nextjs-rho-eight-22.vercel.app/

Thanks for reading, I hope this article has been of great help to you. Check my [blog](tosyn.xyz) for more informative posts like this.