This code uses Javascript to make AJAX api request.
The API request is written in both traditional Javascript AJAX ES4 and new async/await functionality developed in ES6(promises) and ES8 respectively.
Promises are a new type of JavaScript object that represent data that will eventually be returned from a request.
- Add the API key from Rebrand.ly website to
main.jsfile inside public and it should work like a magic :) - Remove one of the shortenUrl AJAX functions