コンソールに結果を出せればいいだけ。
axiosのインストール
本家サイトに書いてあるのでそのとおりにやればいい。
cd
mkdir axios_test
cd axios_test
npm install axios
WebだとCDNも利用できるみたい。
利用
とりあえずindex.js作って
index.js
const axios = require('axios');
axios.get('http://www.yahoo.co.jp')
.then(function(response){
console.log(response);
});
実行します。上記のコードだとyahooのHTMLがだらだら表示されます。
node index.js