Deploying a Next.js app with Vercel
We are going to start by deploying our app on Vercel, a platform where we can deploy our apps for free in a simple and convenient way. Follow these steps to get started deploying our Next.js app with Vercel:
- Copy the existing
ch18
folder to a newch19
folder by running the following command:$ cp -R ch18 ch19
- Open the
ch19
folder in VS Code. - Install the Vercel CLI tool as a global package with the following command:
$ npm install -g [email protected]
- Run the Vercel CLI:
$ vercel
- You will be asked to log in to Vercel. Select either of the login methods and follow the steps provided by Vercel to log in.
- After successfully logging in, you will be asked questions about the deployment of your project, confirm all of them with the default values provided by pressing Enter/Return until the Vercel CLI attempts to build your project.
Figure 19.1 – Attempting to deploy our app to Vercel
- While...