It returns the (arguably) incorrect IP for me - the example uses IPv4, but I think you are returning IPv6.
I crossed checked my ip on your API vs one of the mainstream ‘what is my ip’ sites and got differing values.
Ok…I think I’ve got this fixed. I was using request.connection.remoteAddress to return the ip but that should have been request.ip…
Try it again and thanks!
That’s funny - I somehow started with req.ip and it was returning the IPv6 ip for me, so I did some ‘jumping though multiple hoops’ thing I found on Stack Overflow to get the IPv4. I may have to revisit mine and see if there is a simpler way of doing it.
looks nice and I like your index file