Created
June 1, 2017 13:37
-
-
Save bekatom/2124f35d1d4afbfe978e6079adf0615d to your computer and use it in GitHub Desktop.
Get location data by IP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var axios = require('axios') | |
const getAddressByIP = (ip) => { | |
return axios.get(`http://ip-api.com/json/${ip}?lang=en`).then((data) => data) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment