Show ping
Opened this issue · 2 comments
https://livebeats.fly.dev/ has a way to show your Fly region and ping. This would be a nice addon
Can I do this?
I understand how to calculate ping for LiveView. Just use phx-hook like that:
https://github.com/fly-apps/live_beats/blob/6233b438c23c74c21543a5a122816f5dc2f71974/assets/js/app.js#L185-L203
But I'm not sure for the geographic location. I am going to use geoip library:
https://github.com/navinpeiris/geoip
with free data provider - freegeoip (https://github.com/fiorix/freegeoip).
And the last one is country flags. -> From clone of this repository: https://github.com/hampusborgos/country-flags
It's ok?
But I'm not sure for the geographic location. I am going to use geoip library:
LiveBeats used an easy trick: they get the env variable FLY_REGION and show a flag for it. It's not perfect but works!