Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Node.js and Express - How to get location of browser

Node.js and Express - How to get location of browser

Problem

After researching for a while I couldn't find out how to get the location of the Browser (By IP). I am also fairly new to Node.js and Express. Is there a module or some code to help you get the location of the browser viewing the node.js app? I need the longitude and latitude or at least the zip code.

Thanks

Problem courtesy of: PetersCodeProblems

Solution

I doubt that there is only one module. Have a look at https://github.com/joyent/node/wiki/modules for common modules and you might try searching for geo at http://search.npmjs.org/ - and there's also Nipster and Toolbox for searching for modules.

TL;DR: node-geoip seems to be what you are looking for.

Solution courtesy of: Sebastian Stumpf

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Node.js and Express - How to get location of browser

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×