Using IP2LOCATION Database which you can download for free from : HERE
If you need more accuracy buy a premium one from: HERE Then follow the instructions on the comments in index.js 👍
A micro-service that provides location information about a given ip address
JavaScriptGPL-3.0