Getting Started with Next.js and ZEIT Now

Create a Next.js app and deploy it with ZEIT Now.

Next.js is a framework, created by ZEIT, for creating production-ready and lightning fast React apps with a lot of handy features built-in.

In this guide, you will learn how to create and deploy a Next.js app with ZEIT Now.

Step 1: Set Up Your Next.js Project

The first step in setting up your new Next.js project is to generate it with create-next-app:

npm init next-app my-next-app && cd my-next-app

Initializing a Next.js project with create-next-app and npm, then moving into the project directory.

Step 2: Deploying Your Next.js Project with ZEIT Now

There are two ways to deploy with ZEIT Now. We recommend using a ZEIT Now for Git Integration for ease-of-use. Alternatively, Now CLI can be used to generate a manual Preview Deployment.

Once deployed, you will get a URL to see your app live, such as the following:

To deploy your Next.js app with a ZEIT Now for Git Integration, make sure it has been pushed to a Git repository.

Import the project into ZEIT Now using your Git Integration of choice:

After your project has been imported, all subsequent pushes to branches will generate Preview Deployments, and all changes made to the default branch (commonly "master") will result in a Production Deployment.

Set up a Next.js app with a few clicks using the Deploy button, and create a Git repository for it in the process for automatic deployments for your updates.

Written By
Written by timothytimothy
Written by msweeneydevmsweeneydev