XMLHttpRequest cannot load http://api.openweathermap.org/data/2.5/weather?q=groningen&units=metric&lang=en&mode=json&APPID=XXX. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'http://localhost:8080' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute.
Code (VueJS):
import Weather from 'openweather-apis'
Weather.setLang('en')
Weather.setUnits('metric')
Weather.setCity('Groningen')
Weather.setAPPID('XXX')
Weather.getTemperature(function (err, temp) {
if (err) console.log(err)
console.log(temp)
})
Chrome dev console:
Code (VueJS):