<- Back to previous lesson
The goal of this lesson is to deploy our completed project to Vercel.
Be sure to switch to the
10-lessonbranch in your local environment.
If you don't already have a Vercel account, create one.
- From the Vercel dashboard, create a new project.
- Choose Continue with GitHub.
- Find the social-app-demo repository in the list and choose Import.
- Select Next.js as the framework.
- Under Environment Variables, add all of your environment variables from your
.env.localfile. - Click Deploy.
- This initail deploy will not really do anything since the
mainbranch does not contain our final code.
- This initail deploy will not really do anything since the
- Go back to the main dashboard and select your new project.
- Take note of your custom domain. (Example:
https://socialbutterfly.vercel.app)
- Take note of your custom domain. (Example:
- From the Settings tab, click Git.
- Change the Production Branch to
10-lessonand save. - Navigate to the Environment Variables tab.
- Change
AUTH0_BASE_URLto your custom Vercel domain noted earlier. - To redeploy, you'll need to make a new commit to the
10-lessonbranch. You can simply open theREADME.mdfile, add a space somewhere, and make a new commit.
- In your Auth0 application, update the following fields under Settings:
- Allowed Callback URLs:
http://localhost:3000/api/auth/callback, https://*.vercel.app/api/auth/callback - Allowed Logout URLS:
http://localhost:3000, https://*.vercel.app, http://*.vercel.app - Allowed Web Origins:
https://*.vercel.app
Great job! Your application is now deployed and you can open it from the Overview tab in Vercel or by navigating to your custom Vercel domain.
Team up with someone and browse to each other's deployed applications. Leave some flutters to let them know it's working.