Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show ping #2

Open
lubien opened this issue Oct 16, 2022 · 2 comments · May be fixed by #34
Open

Show ping #2

lubien opened this issue Oct 16, 2022 · 2 comments · May be fixed by #34

Comments

@lubien
Copy link
Owner

lubien commented Oct 16, 2022

https://livebeats.fly.dev/ has a way to show your Fly region and ping. This would be a nice addon

@rsolovjov
Copy link

rsolovjov commented Nov 2, 2022

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?

@lubien
Copy link
Owner Author

lubien commented Nov 3, 2022

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!

@rsolovjov rsolovjov linked a pull request Nov 3, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants