0

I am fairly new to Node.js and Express. Is there a module or some code to help you get the actual location of the browser viewing the node.js app? I need the longitude and latitude or at least the zip code.

Thanks

Taieb
  • 920
  • 3
  • 16
  • 37
  • 1
    Search the npm repo for `geolocation`: https://www.npmjs.com/browse/keyword/geolocation – Hywel Rees Mar 07 '17 at 16:45
  • I think GeoIP is outdated ! – Taieb Mar 07 '17 at 17:30
  • You cant do it reliable. You can guess the Location based on the ip, but this is just a rough assumption because ips are **not** bound to a location they only **might** be mainly used in one location. For some ISP it might work for some ISP it might fail. If you want to use the IP for a rough guess use e.g. GeoIP2 or geoip-light. – t.niese Mar 08 '17 at 05:28
  • @t.niese Thank you sir GeoIP2 will do the job ! – Taieb Mar 08 '17 at 13:41

1 Answers1

2

I found on other post this solution

Best node.js module for finding location?

And recommends this module GeoIP

I hope it helps you

Roth.

Community
  • 1
  • 1
Roth
  • 138
  • 1
  • 16
  • 3
    I know that you cannot write comments. But you should not create an answer that only contains a link to another question/answer without providing any additional information that is not given in those answers. – t.niese Mar 07 '17 at 16:50