Deploy your Vue application using Vercel

Deploy your Vue application using Vercel

ยท

3 min read

What is code deployment?

In simple words code deployment is a process of delivering your code from the local environment/server to the environment/server which is going to be used by client.

For example :- We write a code in our local system to develop a product. This cannot be accessed by end users. So, we deploy our code to the environment which will be accessible to the end user.

What is Vercel and Why am i using this for demo?

Vercel is a tool which allows you to deploy your code to the live environment. I have picked it because once you install the vercel, unlike other tools it does not require any sort of configuration to get your application up and running on a live environment. Also, it is easy to scale your small application to a large enterprise application.

Why is it a good practice to deploy your code on live environment?

No matter how small is your application. If you are going to put your application on your portfolio then having it on a live server is a great deal.

Let's explore why.

  1. Nobody has a time to go through your github code when someone is looking to hire you. Having a live application gives you an edge in such cases.

  2. Along with your primary skill, you can develop a secondary skill of deployment to various platforms.

  3. You can get real feedbacks on what you have built.

Now, let's get started with deployment.

I will use the application which we built in our last blog post to deploy on Vercel.

Requirements:

  • Vue/cli should be installed in your system.
  • You should have at least one working application.
  • Create an account on vercel.com and get it verified.

You can refer to my last blog if you do not meet first two requirement.

  1. Installing Vercel.

Open you terminal/cmd and run one of the following command to install the vercel.

yarn global add vercel
     OR
npm install -g vercel
  1. Navigate to your project directory via terminal/cmd and run the following command.
yarn build

yarn-build.png

  1. Check your project directory upon successfully executing the build you must see a dist folder added in your project folder.

Navigate to the newly created dist folder and run the following command

vercel

vercel-login.png

login with the email you used for creating a vercel account and then confirm it in your email.

verify.png

  1. Again run the following command at the path of dist folder
vercel

you will be asked following question and answer them accordingly or you can just follow the following screenshot.

deployed.png

  1. Once your project gets deployed the live url get copied to your clipboard automatically, open your browser and then paste the url.

My live demo app can be seen here

Boom! you have got your first application up and running on a live environment. You can now use this URL to share your application ๐Ÿ˜ƒ .

Thank you ๐Ÿ˜ƒ . Happy Learning.