Using the node package manager (npm)
Axios is available to the npm library and can be easily installed in the project by running the following command in the terminal of your code editor:
$ npm install axios
Using bower to install Axios
Bower is increasingly getting more and more famous among the masses. Bower helps install web packages just like npm. If you are working with bower, then you can install Axios by using the following lines of code:
$ bower install axios
Using a CDN hosted Axios
CDN stands for content delivery networks, these networks allow you to use JavaScript libraries hosted on their servers. Axios can be installed in your project by using one of the two CDN Axios providers, the first being “JsDelivr CDN” and the other one being the “unpkg” CDN.
For JsDelivr CDN use the command in your HTML file:
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
With these above mentioned commands you should be able to install and use Axios in your projects.