How To Build a URL Shortener Application.
Lets build a URL shortener application.
We are going to make a simple application that shortens the URL which has been provided to it. This is a simple application to know how API work and how we can send and receive information through them.
In this article, we are going to build a simple URL shortener application and we are going to use Vue.js to create this application.
What we will learn.
- Make POST requests to API
- Render returned Data
- Data binding.
Creating our application.
To create a Vue application you need to have node.js installed and perform the following functions.
NPM
npm init vite@latest
YARN
yarn create vite
after running the command, vite will prompt you with options to create and select vue as your project and specify your project name respectively.
After completion, change your directory into your newly created project and run the command npm install to install the necessary project dependencies.