What about it?
I had trouble to find a website that just shows me my IP infos.
All i wanted to have was my IP Address and some basic informations like localisation, server...
Websites about IP Addresses are full of advertising, products to sell and other functionnality that i did not need.
Features
A picture paints a thousand words
Stack
- Vite
- React
- react-leaflet
API
- api.ipify.org
- ipinfo.io
Troubleshooting
If the website keeps showing "searching", try to disable your Adblocker and hard refresh with "ctrl + F5".
Contributions
Feel free to fork the project and add features, the only thing i want is that the website keeps it simplicity.
Top comments (9)
Tried it and yeah, stuck on searching until disable adblocker, that's not good.
I made something similar, but built my own API that I get the data from and can search any IP if want to.
ipinfo.karate.monster
Thanks for the feedback Zoppatorsk, i just handle this by asking the user to disable adblocker.
Happy that you get it working with your own api, this is great!
Yeah, u must be running some scripts or something that the adblocker catches..
Like when I built my first fullstack site, a site for selling used computers and hardware, adblocker really did not like that i called things ad's and blocked most stuff.. haha..
Well, it was the API that was the primary thing, the site is just a demo frontend consuming it. U can make those API's in a super simple way if just use packages provided by the data provider but for me I download the data from different providers and store in a database.
Yeah, for what i saw, adblocker tries to block any script that can lead to privacy tracking. Obviously, an ip address is too private for uBlock π
Honestly, it's just a mini side project that i made to test the geolocation of an ip address and use it with react-leaflet. Nothing fancy, but i wanted to share it anyway.
But yeah, if i want to do a REST API to connect my frontend, i will use "ip" or "public-ip" node module and store that data in a mongodb.
Or maybe i'll try to get that ip with php and store it in a mysql db, but i need to work on it haha.
I checked the providers that you use for ipinfo.karate, did you paid for the service or the free versions suits your needs?
Also, Is it fast and without rate limiting?
ahh.. ok.. Yeah, my stuff does not have that problem as just using backend rendering with a template engine.
If u serve the frontend from node shld be able to just pull the users ip from the request similar to what i do.
There is not even need to store anything in a db, can just use the geolite2 or ip2loaction packages as those have either file based or in memory database built in.
I just use the free versions as it was just a hobby project.
My API-backend have no rate limiting implemented for now and also it's not available over internet, only my demo app that got access to it.
Speed is not an issue, I use their data, not their services. What takes longest is to fetch the static map images showing the location that I fetch. Can't control that as it's not on my server.
I have an old but cheap n fast enough machine (4x10cores, so 80threads n 192gb or so ram) co-located in a data center with gigabit internet that runs all my n my sons stuff.. cheaper to co-locate it then paying the electricity it consumes, haha..
Ok i understand, thanks for the reply.
Mapbox service is also interesting, but i prefer to have a map that the user can interact with instead of a static image.
I find react-leaflet to be a great react component to easily get a location marker on a basic map.
But i'm really curious to test your stack when i have the time :)
Yeah.. I understand, for me I wanted to do something different as i have done soo much map stuff before.. haha..
Used leaflet years ago but now just use mapbox-gl or maplibre-gl but yeah, those libraries are rather heavy so takes a bit to load in.
As u already know React I'm sure u can make it really simple by just using Next.JS .. get best of both worlds (frontend/backend in one so to speak) and if i'm not wrong there is several places that can deploy Next.JS apps for free... (don't quote on me on that one.)
Edit: one of my oldest but still the most fun even though rather useless map app. tweetmap
Yeah it is sometime painful to see all those tiles slow down the website haha
And yeah, I totally agree, Next.js is really a game changer.
BTW, tweetmap is truly awesome! gg man!
Yeah.. can totally agree on that.. there is a tiling server running somewhere on my server but I don't know the address to it so have not tried it out.. haha, I will some day.
U could try switch to the cartocdn n see if speed things up, for me they at least felt faster then mapbox but i have no hard data on that.
Here some link to how can use in leaflet
Haha.. a miracle it works at all thinking about how janky the code is.. ;) I did make an updated version with some more features but never published as have issues with the tooling, have planned to just rewrite the whole thing.