Set up Nuxt.js Example Project
First thing first, let's generates a new Nuxt.js app by running any of the commands below.
# if you are using yarn yarn create nuxt-app example-app # if you are using npm npm init nuxt-app example-app # if you are using npx npx create-nuxt-app example-app
Deploy Nuxt.js Project to Vercel
Now with the newly created Nuxt.js example project, it's time to create a new Vercel Account and import the repository to Vercel. The setup is painless and just follow along with the instructions that they have provide.
After the example project has been imported, any branch that is available in the repository will generate Preview Deployment and any changes commonly the "main" (master) branch will be the production deployment. Each branch will have its own dedicated links but what's shown to the user is the main branch.
Make sure to update the build and deployment settings as follow. By now Vercel will provide you with the URL that is publicly accessible and if you need to customize it just visit the "Domains" section of the project settings page.
Have fun and give it a try! The next tutorial will be on how to add Deployment Hooks and Environment variables so do give that a read to supercharge your Nuxt.js website.