使用 node-fetch 取得 Weather API 當前天氣數據
node-fetch:
https://www.npmjs.com/package/node-fetch
Weather API:
https://openweathermap.org/api
在首頁搜尋城市,例如搜尋 "Taipei"
並跳轉下一頁展示天氣圖片、天氣、詳細描述及溫度
可以繼續搜尋其他城市,如 "Kyoto"
也以 Ajax 的方式重新渲染相對應的城市天氣
完整程式碼(Github):
https://github.com/Bajohn69/js-practice/tree/main/weather