Get Location from Ip Address with Nodejs and Express

Hey Guys, hope you all are doing great !. So couple a weeks ago a created a node module iplocate its a middleware which let me gets the location of the request and where it is coming from. I have used freegeoip  an awesome service for getting this location of a particular ip address. You can make upto 10000 request per hour for free.

So Lets get Started

You can install it using

Just simply require it in your project and use it in your App.

And You will get the location object in your route attached on a request object. In case of an error req.locationError will be populated.

wasn’t that easy?. well that’s it for now Stay tune for more blogs on Node.js and Javascript.

Have a Great day or Night 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.