Next.js can be deployed anywhere, but the easiest way is to use the Vercel platform, which is created by the people who also created Next.js.
Vercel is optimized for Next.js. Out of the box, it applies the following optimizations to your app:
- Every page can either use Static Generation or Server-Side Rendering.
- Pages that use Static Generation and assets (JS, CSS, images, fonts, etc) will automatically be served from Vercel's Edge Network, which is blazingly fast.
- Pages that use Server-Side Rendering and API routes will automatically become isolated Serverless Functions. This allows page rendering and API requests to scale infinitely.
To deploy your app on Vercel, first you need to push it to a Git provider, like GitHub. Then, follow these steps:
- Sign up to Vercel (it's free, no credit card needed)
- When you're ready, hit the "Deploy" button and you app will be built and deployed in a few minutes.
Congratulations! You app is live now! 🎉
Deploy the following project on Vercel: nikolovlazar/deploy-nextjs-on-vercel.
This exercise marks the fifth checkpoint at which we'll go into breakout rooms to do this exercise only. If you're stuck, do not hesitate to ask. As soon as you're done you can fill out either the Post-Breakout Feedback Form, or the feedback form for this exercise. I would appreciate your feedback a lot.
Writing down what you learn is key to your retention. Also, I want to make sure each exercise is effective at helping you learn the material. Please quickly fill out this form so you can elaborate on what you learned and give me feedback so I can improve it for future learners.