一个基于express的天气签名图生成服务,可以让你在网站上显示自己的IP,操作系统,浏览器,当地天气。可以让你在网站上远程调用天气签名图,比如在网站侧栏/弹窗提醒等等...
<img src="http://localhost:4000" alt="" width="428" height="250" />
真是一场酣畅淋漓的查看天气之旅啊!༼·⍨༽༼·∵༽༼· ͒ ͓ ͒༽༼· ͒ ̶ ͒༽༼·⍢༽༼·⍤༽
<img src="http://localhost:4000?type=img" alt="" width="428" height="250" />
也可以通过接口方式返回JSON
//发起请求
axios.get('http://localhost:4000?type=json')
接口返回
{
"imgUrl": "xxx.xxx.png"
}
- 请在config.json中配置你的api key信息(天行api每天可以免费调用1000次)
- 天气预报接口主要天气状态和图标文件名